Skip to content

Commit

Permalink
CodeGen from PR 15703 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 6b83d4620c890bd0cde30c1d470415c893c3b7c8 into ff76d203d545c542fff07c882b5f216c2d665d36
  • Loading branch information
SDKAuto committed Aug 23, 2021
1 parent cadd8b2 commit 78898b3
Show file tree
Hide file tree
Showing 72 changed files with 2,314 additions and 170 deletions.
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
72 changes: 72 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,6 +62,7 @@ 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;
Expand Down Expand Up @@ -147,6 +150,7 @@ 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);
Expand Down Expand Up @@ -177,9 +181,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 Down Expand Up @@ -52,6 +54,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -75,7 +78,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -99,6 +105,7 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantSettingsContract,
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 Down Expand Up @@ -50,6 +52,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -74,7 +77,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -98,6 +104,7 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantSettingsContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiIssueCommentCreateOrUpdateHeaders,
ApiIssueCommentGetEntityTagHeaders,
ApiIssueCommentGetHeaders,
ApiLicenseInformation,
ApiManagementServiceIdentity,
ApiManagementServiceResource,
ApiManagementServiceSkuProperties,
Expand Down Expand Up @@ -50,6 +52,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -74,7 +77,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -98,6 +104,7 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantSettingsContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiIssueCreateOrUpdateHeaders,
ApiIssueGetEntityTagHeaders,
ApiIssueGetHeaders,
ApiIssueUpdateHeaders,
ApiLicenseInformation,
ApiManagementServiceIdentity,
ApiManagementServiceResource,
ApiManagementServiceSkuProperties,
Expand Down Expand Up @@ -51,6 +53,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -76,7 +79,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -100,6 +106,7 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantSettingsContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiLicenseInformation,
ApiManagementServiceApplyNetworkConfigurationParameters,
ApiManagementServiceBackupRestoreParameters,
ApiManagementServiceCheckNameAvailabilityParameters,
Expand Down Expand Up @@ -54,6 +56,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -77,7 +80,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -101,6 +107,7 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantSettingsContract,
Expand Down
Loading

0 comments on commit 78898b3

Please sign in to comment.