Skip to content

Commit

Permalink
CodeGen from PR 15832 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Microsoft.ApiManagement : Release api-version 2021-04-01-preview (Azure#15832)

* Adds base for updating Microsoft.ApiManagement from version preview/2021-01-01-preview to version 2021-04-01-preview

* Updates readme

* Updates API version in new specs and examples

* Added support for GraphQL API type (Azure#14851)

* Added support for GraphQL API type

* Added missing enum value for GraphQL APIs.

* add schema definition fix from 2021-01-01-preview (Azure#14883)

Co-authored-by: Alan Feng <alanfeng@microsoft.com>

* Vanguard: Get Outbound Network Dependency (Azure#14900)

* outbound dependency

* fix resource

* Update backup/restore API for managed identities (Azure#14973)

* Update backup/restore API for system-assigned and user-assigned identities

* Fix formatting issue

* Rename user-assigned-msi-client-id with client-id

* SystemData implemenation on API Management Control Plane (Azure#14899)

* system-data

* fix spec

* remove unreferenced file

* APIM - Network Watcher Connectivity Check integration specs (Azure#15056)

* Connectivity Check API Specs

* Fix

* Fix errors

* style fixs

* Fix 202 code

* HTTPConnect request parameters

* Fix errors

Co-authored-by: Nicolás Barrera <t-nbarrera@microsoft.com>

* Parameter examples added (Azure#14836)

* platformversion (Azure#15114)

* fix update service (Azure#15478)

* HttpConnect example (Azure#15493)

* HttpConnect example

* Prettifier fix

Co-authored-by: Nicolás Barrera <t-nbarrera@microsoft.com>

* Added properties of difference API spec format for "SchemaDocumentProperties" (Azure#15703)

* add schema definition fix from 2021-01-01-preview

* added properties for SchemaDocumentProperties

* updated the fix

* updated fix

* [APIM]Add private endpoint connection APIs (Azure#15115)

* Add private endpoint connection apis

* add readme

* quick fixes

* fix to PE contract

* Small fixes

* small fixes

* small fixes

* Small fixes

* small fixes

* small fix

* small fixes

* small fixes

* small fixes

* Update readme.md

* fix error

* small fix

* fix format

* address comments

* small fixes

* Change to lower case

* small fixes

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

* Adds base for updating Microsoft.ApiManagement from version preview/2021-01-01-preview to version 2021-04-01-preview

* Updates readme

* Updates API version in new specs and examples

* Added support for GraphQL API type (Azure#14851)

* Added support for GraphQL API type

* Added missing enum value for GraphQL APIs.

* add schema definition fix from 2021-01-01-preview (Azure#14883)

Co-authored-by: Alan Feng <alanfeng@microsoft.com>

* Vanguard: Get Outbound Network Dependency (Azure#14900)

* outbound dependency

* fix resource

* Update backup/restore API for managed identities (Azure#14973)

* Update backup/restore API for system-assigned and user-assigned identities

* Fix formatting issue

* Rename user-assigned-msi-client-id with client-id

* SystemData implemenation on API Management Control Plane (Azure#14899)

* system-data

* fix spec

* remove unreferenced file

* APIM - Network Watcher Connectivity Check integration specs (Azure#15056)

* Connectivity Check API Specs

* Fix

* Fix errors

* style fixs

* Fix 202 code

* HTTPConnect request parameters

* Fix errors

Co-authored-by: Nicolás Barrera <t-nbarrera@microsoft.com>

* Parameter examples added (Azure#14836)

* platformversion (Azure#15114)

* fix update service (Azure#15478)

* HttpConnect example (Azure#15493)

* HttpConnect example

* Prettifier fix

Co-authored-by: Nicolás Barrera <t-nbarrera@microsoft.com>

* Added properties of difference API spec format for "SchemaDocumentProperties" (Azure#15703)

* add schema definition fix from 2021-01-01-preview

* added properties for SchemaDocumentProperties

* updated the fix

* updated fix

* [APIM]Add private endpoint connection APIs (Azure#15115)

* Add private endpoint connection apis

* add readme

* quick fixes

* fix to PE contract

* Small fixes

* small fixes

* small fixes

* Small fixes

* small fixes

* small fix

* small fixes

* small fixes

* small fixes

* Update readme.md

* fix error

* small fix

* fix format

* address comments

* small fixes

* Change to lower case

* small fixes

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

* fix tenant sync contract

* fix linter issues

* examples for managed identity backup

* prettier

* Fix Apis-Get and updated comments for api-version 2021-04-01-preview (#3)

* add schema definition fix from 2021-01-01-preview

* added fix

* small fix (#6)

* 'examples' added to RepresentationContract (#7)

Co-authored-by: Alexander Zaslonov <zaslonov.alexander@gmail.com>
Co-authored-by: DreamlessA <DreamlessA@users.noreply.github.com>
Co-authored-by: Alan Feng <alanfeng@microsoft.com>
Co-authored-by: Jatin Sanghvi <20547963+JatinSanghvi@users.noreply.github.com>
Co-authored-by: Nicolás Barrera <nicolasbarrera@outlook.com>
Co-authored-by: Nicolás Barrera <t-nbarrera@microsoft.com>
Co-authored-by: VitaliyKurokhtin <vitaliik@microsoft.com>
Co-authored-by: RupengLiu <rliu1211@terpmail.umd.edu>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: RupengLiu <rupliu@microsoft.com>
Co-authored-by: VitaliyKurokhtin <Vitaliy.Kurokhtin@gmail.com>
  • Loading branch information
12 people committed Sep 23, 2021
1 parent 3c7a547 commit 0c4bb6e
Show file tree
Hide file tree
Showing 74 changed files with 4,395 additions and 392 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
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

0 comments on commit 0c4bb6e

Please sign in to comment.