Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions sdk/apimanagement/arm-apimanagement/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Azure ApiManagementClient SDK for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ApiManagementClient.
This package contains an isomorphic SDK (runs both in node.js and in browsers) for ApiManagementClient.

### Currently supported environments

- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge, and Firefox.
- Latest versions of Safari, Chrome, Edge and Firefox.

### Prerequisites

Expand All @@ -21,7 +21,6 @@ Install both packages using the below command:
```bash
npm install --save @azure/arm-apimanagement @azure/identity
```

> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.

Expand All @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/

In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.

#### nodejs - Authentication, client creation, and listByService api as an example written in JavaScript.

##### Sample code
Expand Down Expand Up @@ -92,7 +90,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
const credential = new InteractiveBrowserCredential(
{
clientId: "<client id for your Azure AD app>",
tenantId: "<optional tenant for your organization>"
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmApimanagement.ApiManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
Expand Down
2 changes: 1 addition & 1 deletion sdk/apimanagement/arm-apimanagement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/apimanagement/arm-apimanagement",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/apimanagement/arm-apimanagement",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down
74 changes: 74 additions & 0 deletions sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

import * as msRest from "@azure/ms-rest-js";
import { TokenCredential } from "@azure/core-auth";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
import * as operations from "./operations";
import { ApiManagementClientContext } from "./apiManagementClientContext";

Expand Down Expand Up @@ -60,13 +62,15 @@ class ApiManagementClient extends ApiManagementClientContext {
notificationRecipientUser: operations.NotificationRecipientUser;
notificationRecipientEmail: operations.NotificationRecipientEmail;
openIdConnectProvider: operations.OpenIdConnectProvider;
outboundNetworkDependenciesEndpoints: operations.OutboundNetworkDependenciesEndpoints;
policy: operations.Policy;
policyDescription: operations.PolicyDescription;
portalRevision: operations.PortalRevision;
portalSettings: operations.PortalSettings;
signInSettings: operations.SignInSettings;
signUpSettings: operations.SignUpSettings;
delegationSettings: operations.DelegationSettings;
privateEndpointConnection: operations.PrivateEndpointConnectionOperations;
product: operations.Product;
productApi: operations.ProductApi;
productGroup: operations.ProductGroup;
Expand Down Expand Up @@ -147,13 +151,15 @@ class ApiManagementClient extends ApiManagementClientContext {
this.notificationRecipientUser = new operations.NotificationRecipientUser(this);
this.notificationRecipientEmail = new operations.NotificationRecipientEmail(this);
this.openIdConnectProvider = new operations.OpenIdConnectProvider(this);
this.outboundNetworkDependenciesEndpoints = new operations.OutboundNetworkDependenciesEndpoints(this);
this.policy = new operations.Policy(this);
this.policyDescription = new operations.PolicyDescription(this);
this.portalRevision = new operations.PortalRevision(this);
this.portalSettings = new operations.PortalSettings(this);
this.signInSettings = new operations.SignInSettings(this);
this.signUpSettings = new operations.SignUpSettings(this);
this.delegationSettings = new operations.DelegationSettings(this);
this.privateEndpointConnection = new operations.PrivateEndpointConnectionOperations(this);
this.product = new operations.Product(this);
this.productApi = new operations.ProductApi(this);
this.productGroup = new operations.ProductGroup(this);
Expand All @@ -177,9 +183,77 @@ class ApiManagementClient extends ApiManagementClientContext {
this.userConfirmationPassword = new operations.UserConfirmationPassword(this);
this.apiExport = new operations.ApiExport(this);
}

/**
* 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.
* @param serviceName The name of the API Management service.
* @param connectivityCheckRequestParams Connectivity Check request parameters.
* @param [options] The optional parameters
* @returns Promise<Models.PerformConnectivityCheckAsyncResponse>
*/
performConnectivityCheckAsync(resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: Models.ConnectivityCheckRequest, options?: msRest.RequestOptionsBase): Promise<Models.PerformConnectivityCheckAsyncResponse> {
return this.beginPerformConnectivityCheckAsync(resourceGroupName,serviceName,connectivityCheckRequestParams,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PerformConnectivityCheckAsyncResponse>;
}

/**
* 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.
* @param serviceName The name of the API Management service.
* @param connectivityCheckRequestParams Connectivity Check request parameters.
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginPerformConnectivityCheckAsync(resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: Models.ConnectivityCheckRequest, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.sendLRORequest(
{
resourceGroupName,
serviceName,
connectivityCheckRequestParams,
options
},
beginPerformConnectivityCheckAsyncOperationSpec,
options);
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const beginPerformConnectivityCheckAsyncOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck",
urlParameters: [
Parameters.resourceGroupName,
Parameters.serviceName,
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "connectivityCheckRequestParams",
mapper: {
...Mappers.ConnectivityCheckRequest,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.ConnectivityCheckResponse
},
202: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};

export {
ApiManagementClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import * as Models from "./models";
import * as msRest from "@azure/ms-rest-js";
import { TokenCredential } from "@azure/core-auth";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import { TokenCredential } from "@azure/core-auth";

const packageName = "@azure/arm-apimanagement";
const packageVersion = "7.1.1";
Expand Down Expand Up @@ -50,7 +50,7 @@ export class ApiManagementClientContext extends msRestAzure.AzureServiceClient {

super(credentials, options);

this.apiVersion = '2020-12-01';
this.apiVersion = '2021-04-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiDiagnosticCreateOrUpdateHeaders,
ApiDiagnosticGetEntityTagHeaders,
ApiDiagnosticGetHeaders,
ApiDiagnosticUpdateHeaders,
ApiLicenseInformation,
ApiManagementServiceIdentity,
ApiManagementServiceResource,
ApiManagementServiceSkuProperties,
Expand All @@ -23,10 +25,12 @@ export {
ApiVersionConstraint,
ApiVersionSetContract,
ApiVersionSetContractDetails,
ArmIdWrapper,
AssociationContract,
AuthenticationSettingsContract,
AuthorizationServerContract,
AuthorizationServerUpdateContract,
AzureEntityResource,
BackendAuthorizationHeaderCredentials,
BackendContract,
BackendCredentialsContract,
Expand All @@ -52,6 +56,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -75,7 +80,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -84,11 +92,17 @@ export {
PortalSettingsContract,
PortalSigninSettings,
PortalSignupSettings,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateLinkResource,
PrivateLinkServiceConnectionState,
ProductContract,
ProxyResource,
RecipientEmailContract,
RecipientsContractProperties,
RecipientUserContract,
RegistrationDelegationSettingsProperties,
RemotePrivateEndpointConnectionWrapper,
RepresentationContract,
RequestContract,
Resource,
Expand All @@ -99,11 +113,14 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantConfigurationSyncStateContract,
TenantSettingsContract,
TermsOfServiceProperties,
TokenBodyParameterContract,
TrackedResource,
UserContract,
UserIdentityContract,
UserIdentityProperties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiIssueAttachmentCreateOrUpdateHeaders,
ApiIssueAttachmentGetEntityTagHeaders,
ApiIssueAttachmentGetHeaders,
ApiLicenseInformation,
ApiManagementServiceIdentity,
ApiManagementServiceResource,
ApiManagementServiceSkuProperties,
Expand All @@ -22,10 +24,12 @@ export {
ApiVersionConstraint,
ApiVersionSetContract,
ApiVersionSetContractDetails,
ArmIdWrapper,
AssociationContract,
AuthenticationSettingsContract,
AuthorizationServerContract,
AuthorizationServerUpdateContract,
AzureEntityResource,
BackendAuthorizationHeaderCredentials,
BackendContract,
BackendCredentialsContract,
Expand All @@ -50,6 +54,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -74,7 +79,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -83,11 +91,17 @@ export {
PortalSettingsContract,
PortalSigninSettings,
PortalSignupSettings,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateLinkResource,
PrivateLinkServiceConnectionState,
ProductContract,
ProxyResource,
RecipientEmailContract,
RecipientsContractProperties,
RecipientUserContract,
RegistrationDelegationSettingsProperties,
RemotePrivateEndpointConnectionWrapper,
RepresentationContract,
RequestContract,
Resource,
Expand All @@ -98,11 +112,14 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantConfigurationSyncStateContract,
TenantSettingsContract,
TermsOfServiceProperties,
TokenBodyParameterContract,
TrackedResource,
UserContract,
UserIdentityContract,
UserIdentityProperties,
Expand Down
Loading