Skip to content

Commit

Permalink
CodeGen from PR 15667 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Schema resource added in REST API Spec for api-version 2021-04-01-preview (Azure#15667)

* 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>

* Rename from SchemaContract to ApiSchemaContract

* apimschema.json added to last apim preview version

* Completing specification for Schema resource.
Fixing changes in SchemaContract.

* Value field added to Schema resource specification.

* path fixed.
Renamed from ApiSchema to Schema.
Adding suppression rule to readme.md
Custom word added for spellcheck

* Fixing PR observations.

* 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>

* Merge main

* Modifications to Schema definition to add "description" field.
Updating examples of Schema.

* Fixing apimanagement.json

* Prettier applied in files

* Fixing PR comments

* fixing x-ms-long-running-operation.

* x-ms-long-running-operation : true in apischema.

* Removing "Resource" type from apimanagement.json

* Apimschema.json updated to point to types.json for ErrorResponse.

* undoing change of responseBody

* Updating ErrorResponse.

* Fixing definitions merge.

Co-authored-by: Samir Solanki <samirsolanki@outlook.com>
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: Christian Palomares <cpalomar@microsoft.com>
Co-authored-by: RupengLiu <rliu1211@terpmail.umd.edu>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
  • Loading branch information
12 people committed Nov 10, 2021
1 parent b049934 commit 26202e4
Show file tree
Hide file tree
Showing 77 changed files with 5,451 additions and 461 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
76 changes: 76 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 All @@ -76,6 +80,7 @@ class ApiManagementClient extends ApiManagementClientContext {
quotaByPeriodKeys: operations.QuotaByPeriodKeys;
region: operations.Region;
reports: operations.Reports;
schema: operations.Schema;
tenantSettings: operations.TenantSettings;
apiManagementSkus: operations.ApiManagementSkus;
subscription: operations.Subscription;
Expand Down Expand Up @@ -147,13 +152,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 @@ -163,6 +170,7 @@ class ApiManagementClient extends ApiManagementClientContext {
this.quotaByPeriodKeys = new operations.QuotaByPeriodKeys(this);
this.region = new operations.Region(this);
this.reports = new operations.Reports(this);
this.schema = new operations.Schema(this);
this.tenantSettings = new operations.TenantSettings(this);
this.apiManagementSkus = new operations.ApiManagementSkus(this);
this.subscription = new operations.Subscription(this);
Expand All @@ -177,9 +185,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.2";
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,24 +9,29 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiDiagnosticCreateOrUpdateHeaders,
ApiDiagnosticGetEntityTagHeaders,
ApiDiagnosticGetHeaders,
ApiDiagnosticUpdateHeaders,
ApiLicenseInformation,
ApiManagementServiceIdentity,
ApiManagementServiceResource,
ApiManagementServiceSkuProperties,
ApiManagementServiceUpdateParameters,
ApimResource,
ApiReleaseContract,
ApiSchemaContract,
ApiVersionConstraint,
ApiVersionSetContract,
ApiVersionSetContractDetails,
ArmIdWrapper,
AssociationContract,
AuthenticationSettingsContract,
AuthorizationServerContract,
AuthorizationServerUpdateContract,
AzureEntityResource,
BackendAuthorizationHeaderCredentials,
BackendContract,
BackendCredentialsContract,
Expand All @@ -52,6 +57,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -75,7 +81,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -84,11 +93,17 @@ export {
PortalSettingsContract,
PortalSigninSettings,
PortalSignupSettings,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateLinkResource,
PrivateLinkServiceConnectionState,
ProductContract,
ProxyResource,
RecipientEmailContract,
RecipientsContractProperties,
RecipientUserContract,
RegistrationDelegationSettingsProperties,
RemotePrivateEndpointConnectionWrapper,
RepresentationContract,
RequestContract,
Resource,
Expand All @@ -99,11 +114,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,23 +9,28 @@
export {
AccessInformationContract,
AdditionalLocation,
ApiContactInformation,
ApiContract,
ApiIssueAttachmentCreateOrUpdateHeaders,
ApiIssueAttachmentGetEntityTagHeaders,
ApiIssueAttachmentGetHeaders,
ApiLicenseInformation,
ApiManagementServiceIdentity,
ApiManagementServiceResource,
ApiManagementServiceSkuProperties,
ApiManagementServiceUpdateParameters,
ApimResource,
ApiReleaseContract,
ApiSchemaContract,
ApiVersionConstraint,
ApiVersionSetContract,
ApiVersionSetContractDetails,
ArmIdWrapper,
AssociationContract,
AuthenticationSettingsContract,
AuthorizationServerContract,
AuthorizationServerUpdateContract,
AzureEntityResource,
BackendAuthorizationHeaderCredentials,
BackendContract,
BackendCredentialsContract,
Expand All @@ -50,6 +55,7 @@ export {
EmailTemplateParametersContractProperties,
ErrorFieldContract,
ErrorResponse,
ErrorResponseBody,
GatewayCertificateAuthorityContract,
GatewayContract,
GatewayHostnameConfigurationContract,
Expand All @@ -74,7 +80,10 @@ export {
OpenIdAuthenticationSettingsContract,
OpenidConnectProviderContract,
OperationContract,
OperationResultContract,
OperationResultLogItemContract,
ParameterContract,
ParameterExampleContract,
PipelineDiagnosticSettings,
PolicyContract,
PolicyDescriptionContract,
Expand All @@ -83,11 +92,17 @@ export {
PortalSettingsContract,
PortalSigninSettings,
PortalSignupSettings,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateLinkResource,
PrivateLinkServiceConnectionState,
ProductContract,
ProxyResource,
RecipientEmailContract,
RecipientsContractProperties,
RecipientUserContract,
RegistrationDelegationSettingsProperties,
RemotePrivateEndpointConnectionWrapper,
RepresentationContract,
RequestContract,
Resource,
Expand All @@ -98,11 +113,14 @@ export {
SubscriptionContract,
SubscriptionKeyParameterNamesContract,
SubscriptionsDelegationSettingsProperties,
SystemData,
TagContract,
TagDescriptionContract,
TenantConfigurationSyncStateContract,
TenantSettingsContract,
TermsOfServiceProperties,
TokenBodyParameterContract,
TrackedResource,
UserContract,
UserIdentityContract,
UserIdentityProperties,
Expand Down
Loading

0 comments on commit 26202e4

Please sign in to comment.