release-for-arm-apimanagement (#5184)
This commit is contained in:
Родитель
2528f6d21a
Коммит
552cb002b1
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Microsoft
|
||||
Copyright (c) 2020 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -3,8 +3,7 @@ uid: azure-arm-apimanagement
|
|||
summary: *content
|
||||
|
||||
---
|
||||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://www.npmjs.com/package/@azure/arm-apimanagement) which works on Node.js and browsers.**
|
||||
**See https://aka.ms/azure-sdk-for-js-migration to learn more.**
|
||||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.**
|
||||
## Microsoft Azure SDK for Node.js - ApiManagementClient
|
||||
|
||||
This project provides a Node.js package for accessing Azure. Right now it supports:
|
||||
|
|
|
@ -81,18 +81,22 @@ export default class ApiManagementClient extends AzureServiceClient {
|
|||
apiManagementService: operations.ApiManagementService;
|
||||
diagnostic: operations.Diagnostic;
|
||||
emailTemplate: operations.EmailTemplate;
|
||||
gateway: operations.Gateway;
|
||||
gatewayHostnameConfiguration: operations.GatewayHostnameConfiguration;
|
||||
gatewayApi: operations.GatewayApi;
|
||||
group: operations.Group;
|
||||
groupUser: operations.GroupUser;
|
||||
identityProvider: operations.IdentityProvider;
|
||||
issue: operations.Issue;
|
||||
logger: operations.Logger;
|
||||
namedValue: operations.NamedValue;
|
||||
networkStatus: operations.NetworkStatus;
|
||||
notification: operations.Notification;
|
||||
notificationRecipientUser: operations.NotificationRecipientUser;
|
||||
notificationRecipientEmail: operations.NotificationRecipientEmail;
|
||||
openIdConnectProvider: operations.OpenIdConnectProvider;
|
||||
policy: operations.Policy;
|
||||
policySnippet: operations.PolicySnippet;
|
||||
policyDescription: operations.PolicyDescription;
|
||||
signInSettings: operations.SignInSettings;
|
||||
signUpSettings: operations.SignUpSettings;
|
||||
delegationSettings: operations.DelegationSettings;
|
||||
|
@ -101,7 +105,6 @@ export default class ApiManagementClient extends AzureServiceClient {
|
|||
productGroup: operations.ProductGroup;
|
||||
productSubscriptions: operations.ProductSubscriptions;
|
||||
productPolicy: operations.ProductPolicy;
|
||||
property: operations.Property;
|
||||
quotaByCounterKeys: operations.QuotaByCounterKeys;
|
||||
quotaByPeriodKeys: operations.QuotaByPeriodKeys;
|
||||
region: operations.Region;
|
||||
|
|
|
@ -50,7 +50,7 @@ class ApiManagementClient extends ServiceClient {
|
|||
|
||||
super(credentials, options);
|
||||
|
||||
this.apiVersion = '2019-01-01';
|
||||
this.apiVersion = '2019-12-01';
|
||||
this.acceptLanguage = 'en-US';
|
||||
this.longRunningOperationRetryTimeout = 30;
|
||||
this.generateClientRequestId = true;
|
||||
|
@ -97,18 +97,22 @@ class ApiManagementClient extends ServiceClient {
|
|||
this.apiManagementService = new operations.ApiManagementService(this);
|
||||
this.diagnostic = new operations.Diagnostic(this);
|
||||
this.emailTemplate = new operations.EmailTemplate(this);
|
||||
this.gateway = new operations.Gateway(this);
|
||||
this.gatewayHostnameConfiguration = new operations.GatewayHostnameConfiguration(this);
|
||||
this.gatewayApi = new operations.GatewayApi(this);
|
||||
this.group = new operations.Group(this);
|
||||
this.groupUser = new operations.GroupUser(this);
|
||||
this.identityProvider = new operations.IdentityProvider(this);
|
||||
this.issue = new operations.Issue(this);
|
||||
this.logger = new operations.Logger(this);
|
||||
this.namedValue = new operations.NamedValue(this);
|
||||
this.networkStatus = new operations.NetworkStatus(this);
|
||||
this.notification = new operations.Notification(this);
|
||||
this.notificationRecipientUser = new operations.NotificationRecipientUser(this);
|
||||
this.notificationRecipientEmail = new operations.NotificationRecipientEmail(this);
|
||||
this.openIdConnectProvider = new operations.OpenIdConnectProvider(this);
|
||||
this.policy = new operations.Policy(this);
|
||||
this.policySnippet = new operations.PolicySnippet(this);
|
||||
this.policyDescription = new operations.PolicyDescription(this);
|
||||
this.signInSettings = new operations.SignInSettings(this);
|
||||
this.signUpSettings = new operations.SignUpSettings(this);
|
||||
this.delegationSettings = new operations.DelegationSettings(this);
|
||||
|
@ -117,7 +121,6 @@ class ApiManagementClient extends ServiceClient {
|
|||
this.productGroup = new operations.ProductGroup(this);
|
||||
this.productSubscriptions = new operations.ProductSubscriptions(this);
|
||||
this.productPolicy = new operations.ProductPolicy(this);
|
||||
this.property = new operations.Property(this);
|
||||
this.quotaByCounterKeys = new operations.QuotaByCounterKeys(this);
|
||||
this.quotaByPeriodKeys = new operations.QuotaByPeriodKeys(this);
|
||||
this.region = new operations.Region(this);
|
||||
|
|
|
@ -18,8 +18,12 @@ class AccessInformationContract {
|
|||
/**
|
||||
* Create a AccessInformationContract.
|
||||
* @property {string} [id] Identifier.
|
||||
* @property {string} [primaryKey] Primary access key.
|
||||
* @property {string} [secondaryKey] Secondary access key.
|
||||
* @property {string} [primaryKey] Primary access key. This property will not
|
||||
* be filled on 'GET' operations! Use '/listSecrets' POST request to get the
|
||||
* value.
|
||||
* @property {string} [secondaryKey] Secondary access key. This property will
|
||||
* not be filled on 'GET' operations! Use '/listSecrets' POST request to get
|
||||
* the value.
|
||||
* @property {boolean} [enabled] Determines whether direct access is enabled.
|
||||
*/
|
||||
constructor() {
|
||||
|
|
|
@ -23,7 +23,7 @@ class AdditionalLocation {
|
|||
* @property {string} [sku.name] Name of the Sku. Possible values include:
|
||||
* 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption'
|
||||
* @property {number} [sku.capacity] Capacity of the SKU (number of deployed
|
||||
* units of the SKU).
|
||||
* units of the SKU). For Consumption SKU capacity must be specified as 0.
|
||||
* @property {array} [publicIPAddresses] Public Static Load Balanced IP
|
||||
* addresses of the API Management service in the additional location.
|
||||
* Available only for Basic, Standard and Premium SKU.
|
||||
|
@ -42,6 +42,9 @@ class AdditionalLocation {
|
|||
* service in.
|
||||
* @property {string} [gatewayRegionalUrl] Gateway URL of the API Management
|
||||
* service in the Region.
|
||||
* @property {boolean} [disableGateway] Property only valid for an Api
|
||||
* Management service deployed in multiple locations. This can be used to
|
||||
* disable the gateway in this additional location. Default value: false .
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
@ -120,6 +123,14 @@ class AdditionalLocation {
|
|||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
disableGateway: {
|
||||
required: false,
|
||||
serializedName: 'disableGateway',
|
||||
defaultValue: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,10 +36,6 @@ class ApiContract extends models['Resource'] {
|
|||
* @property {array}
|
||||
* [authenticationSettings.openid.bearerTokenSendingMethods] How to send
|
||||
* token to the server.
|
||||
* @property {boolean} [authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API,
|
||||
* true - API is included into closed products only, false - API is included
|
||||
* into open products alone, null - there is a mix of products.
|
||||
* @property {object} [subscriptionKeyParameterNames] Protocols over which
|
||||
* API is made available.
|
||||
* @property {string} [subscriptionKeyParameterNames.header] Subscription key
|
||||
|
|
|
@ -33,10 +33,6 @@ class ApiCreateOrUpdateParameter {
|
|||
* @property {array}
|
||||
* [authenticationSettings.openid.bearerTokenSendingMethods] How to send
|
||||
* token to the server.
|
||||
* @property {boolean} [authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API,
|
||||
* true - API is included into closed products only, false - API is included
|
||||
* into open products alone, null - there is a mix of products.
|
||||
* @property {object} [subscriptionKeyParameterNames] Protocols over which
|
||||
* API is made available.
|
||||
* @property {string} [subscriptionKeyParameterNames.header] Subscription key
|
||||
|
@ -91,7 +87,7 @@ class ApiCreateOrUpdateParameter {
|
|||
* @property {string} [format] Format of the Content in which the API is
|
||||
* getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
* @property {object} [wsdlSelector] Criteria to limit import of WSDL to a
|
||||
* subset of the document.
|
||||
* @property {string} [wsdlSelector.wsdlServiceName] Name of service to
|
||||
|
|
|
@ -33,10 +33,6 @@ class ApiEntityBaseContract {
|
|||
* @property {array}
|
||||
* [authenticationSettings.openid.bearerTokenSendingMethods] How to send
|
||||
* token to the server.
|
||||
* @property {boolean} [authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API,
|
||||
* true - API is included into closed products only, false - API is included
|
||||
* into open products alone, null - there is a mix of products.
|
||||
* @property {object} [subscriptionKeyParameterNames] Protocols over which
|
||||
* API is made available.
|
||||
* @property {string} [subscriptionKeyParameterNames.header] Subscription key
|
||||
|
|
|
@ -37,6 +37,8 @@ class ApiManagementServiceBaseProperties {
|
|||
* API Management service.
|
||||
* @property {string} [scmUrl] SCM endpoint URL of the API Management
|
||||
* service.
|
||||
* @property {string} [developerPortalUrl] DEveloper Portal endpoint URL of
|
||||
* the API Management service.
|
||||
* @property {array} [hostnameConfigurations] Custom hostname configuration
|
||||
* of the API Management service.
|
||||
* @property {array} [publicIPAddresses] Public Static Load Balanced IP
|
||||
|
@ -58,14 +60,38 @@ class ApiManagementServiceBaseProperties {
|
|||
* @property {array} [additionalLocations] Additional datacenter locations of
|
||||
* the API Management service.
|
||||
* @property {object} [customProperties] Custom properties of the API
|
||||
* Management service. Setting
|
||||
* Management service.</br>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
|
||||
* and 1.2).</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`
|
||||
* can be used to disable just TLS 1.1 and setting
|
||||
* can be used to disable just TLS 1.1.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`
|
||||
* can be used to disable TLS 1.0 on an API Management service.
|
||||
* can be used to disable TLS 1.0 on an API Management service.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`
|
||||
* can be used to disable just TLS 1.1 for communications with
|
||||
* backends.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`
|
||||
* can be used to disable TLS 1.0 for communications with
|
||||
* backends.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can
|
||||
* be used to enable HTTP2 protocol on an API Management service.</br>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
|
||||
* 1st 2018 and `False` otherwise. Http2 setting's default value is
|
||||
* `False`.</br></br>You can disable any of next 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: next ciphers can't be
|
||||
* disabled since they are required by Azure CloudService internal
|
||||
* components:
|
||||
* 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,TLS_RSA_WITH_AES_256_GCM_SHA384
|
||||
* @property {array} [certificates] List of Certificates that need to be
|
||||
* installed in the API Management service. Max supported certificates that
|
||||
* can be installed is 10.
|
||||
|
@ -74,6 +100,9 @@ class ApiManagementServiceBaseProperties {
|
|||
* presented on each request to the gateway. This also enables the ability to
|
||||
* authenticate the certificate in the policy on the gateway. Default value:
|
||||
* false .
|
||||
* @property {boolean} [disableGateway] Property only valid for an Api
|
||||
* Management service deployed in multiple locations. This can be used to
|
||||
* disable the gateway in master region. Default value: false .
|
||||
* @property {string} [virtualNetworkType] 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
|
||||
|
@ -82,6 +111,11 @@ class ApiManagementServiceBaseProperties {
|
|||
* deployment is setup inside a Virtual Network having an Intranet Facing
|
||||
* Endpoint only. Possible values include: 'None', 'External', 'Internal'.
|
||||
* Default value: 'None' .
|
||||
* @property {object} [apiVersionConstraint] Control Plane Apis version
|
||||
* constraint for the API Management service.
|
||||
* @property {string} [apiVersionConstraint.minApiVersion] Limit control
|
||||
* plane API calls to API Management service with version equal to or newer
|
||||
* than this value.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
@ -174,6 +208,14 @@ class ApiManagementServiceBaseProperties {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
developerPortalUrl: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'developerPortalUrl',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hostnameConfigurations: {
|
||||
required: false,
|
||||
serializedName: 'hostnameConfigurations',
|
||||
|
@ -279,6 +321,14 @@ class ApiManagementServiceBaseProperties {
|
|||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
disableGateway: {
|
||||
required: false,
|
||||
serializedName: 'disableGateway',
|
||||
defaultValue: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
virtualNetworkType: {
|
||||
required: false,
|
||||
serializedName: 'virtualNetworkType',
|
||||
|
@ -286,6 +336,14 @@ class ApiManagementServiceBaseProperties {
|
|||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
apiVersionConstraint: {
|
||||
required: false,
|
||||
serializedName: 'apiVersionConstraint',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ApiVersionConstraint'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,18 @@
|
|||
class ApiManagementServiceIdentity {
|
||||
/**
|
||||
* Create a ApiManagementServiceIdentity.
|
||||
* @property {string} type 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. Possible values include:
|
||||
* 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'
|
||||
* @property {uuid} [principalId] The principal id of the identity.
|
||||
* @property {uuid} [tenantId] The client tenant id of the identity.
|
||||
* @property {object} [userAssignedIdentities] 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}'.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
@ -39,9 +49,7 @@ class ApiManagementServiceIdentity {
|
|||
modelProperties: {
|
||||
type: {
|
||||
required: true,
|
||||
isConstant: true,
|
||||
serializedName: 'type',
|
||||
defaultValue: 'SystemAssigned',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
|
@ -61,6 +69,21 @@ class ApiManagementServiceIdentity {
|
|||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
userAssignedIdentities: {
|
||||
required: false,
|
||||
serializedName: 'userAssignedIdentities',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'UserIdentityPropertiesElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'UserIdentityProperties'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
* API Management service.
|
||||
* @property {string} [scmUrl] SCM endpoint URL of the API Management
|
||||
* service.
|
||||
* @property {string} [developerPortalUrl] DEveloper Portal endpoint URL of
|
||||
* the API Management service.
|
||||
* @property {array} [hostnameConfigurations] Custom hostname configuration
|
||||
* of the API Management service.
|
||||
* @property {array} [publicIPAddresses] Public Static Load Balanced IP
|
||||
|
@ -61,14 +63,38 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
* @property {array} [additionalLocations] Additional datacenter locations of
|
||||
* the API Management service.
|
||||
* @property {object} [customProperties] Custom properties of the API
|
||||
* Management service. Setting
|
||||
* Management service.</br>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
|
||||
* and 1.2).</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`
|
||||
* can be used to disable just TLS 1.1 and setting
|
||||
* can be used to disable just TLS 1.1.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`
|
||||
* can be used to disable TLS 1.0 on an API Management service.
|
||||
* can be used to disable TLS 1.0 on an API Management service.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`
|
||||
* can be used to disable just TLS 1.1 for communications with
|
||||
* backends.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`
|
||||
* can be used to disable TLS 1.0 for communications with
|
||||
* backends.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can
|
||||
* be used to enable HTTP2 protocol on an API Management service.</br>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
|
||||
* 1st 2018 and `False` otherwise. Http2 setting's default value is
|
||||
* `False`.</br></br>You can disable any of next 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: next ciphers can't be
|
||||
* disabled since they are required by Azure CloudService internal
|
||||
* components:
|
||||
* 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,TLS_RSA_WITH_AES_256_GCM_SHA384
|
||||
* @property {array} [certificates] List of Certificates that need to be
|
||||
* installed in the API Management service. Max supported certificates that
|
||||
* can be installed is 10.
|
||||
|
@ -77,6 +103,9 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
* presented on each request to the gateway. This also enables the ability to
|
||||
* authenticate the certificate in the policy on the gateway. Default value:
|
||||
* false .
|
||||
* @property {boolean} [disableGateway] Property only valid for an Api
|
||||
* Management service deployed in multiple locations. This can be used to
|
||||
* disable the gateway in master region. Default value: false .
|
||||
* @property {string} [virtualNetworkType] 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
|
||||
|
@ -85,17 +114,33 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
* deployment is setup inside a Virtual Network having an Intranet Facing
|
||||
* Endpoint only. Possible values include: 'None', 'External', 'Internal'.
|
||||
* Default value: 'None' .
|
||||
* @property {object} [apiVersionConstraint] Control Plane Apis version
|
||||
* constraint for the API Management service.
|
||||
* @property {string} [apiVersionConstraint.minApiVersion] Limit control
|
||||
* plane API calls to API Management service with version equal to or newer
|
||||
* than this value.
|
||||
* @property {string} publisherEmail Publisher email.
|
||||
* @property {string} publisherName Publisher name.
|
||||
* @property {object} sku SKU properties of the API Management service.
|
||||
* @property {string} [sku.name] Name of the Sku. Possible values include:
|
||||
* 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption'
|
||||
* @property {number} [sku.capacity] Capacity of the SKU (number of deployed
|
||||
* units of the SKU).
|
||||
* units of the SKU). For Consumption SKU capacity must be specified as 0.
|
||||
* @property {object} [identity] Managed service identity of the Api
|
||||
* Management service.
|
||||
* @property {string} [identity.type] 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. Possible values
|
||||
* include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned',
|
||||
* 'None'
|
||||
* @property {uuid} [identity.principalId] The principal id of the identity.
|
||||
* @property {uuid} [identity.tenantId] The client tenant id of the identity.
|
||||
* @property {object} [identity.userAssignedIdentities] 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}'.
|
||||
* @property {string} location Resource location.
|
||||
* @property {string} [etag] ETag of the resource.
|
||||
*/
|
||||
|
@ -229,6 +274,14 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
developerPortalUrl: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.developerPortalUrl',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hostnameConfigurations: {
|
||||
required: false,
|
||||
serializedName: 'properties.hostnameConfigurations',
|
||||
|
@ -334,6 +387,14 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
disableGateway: {
|
||||
required: false,
|
||||
serializedName: 'properties.disableGateway',
|
||||
defaultValue: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
virtualNetworkType: {
|
||||
required: false,
|
||||
serializedName: 'properties.virtualNetworkType',
|
||||
|
@ -342,6 +403,14 @@ class ApiManagementServiceResource extends models['ApimResource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
apiVersionConstraint: {
|
||||
required: false,
|
||||
serializedName: 'properties.apiVersionConstraint',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ApiVersionConstraint'
|
||||
}
|
||||
},
|
||||
publisherEmail: {
|
||||
required: true,
|
||||
serializedName: 'properties.publisherEmail',
|
||||
|
|
|
@ -19,8 +19,8 @@ class ApiManagementServiceSkuProperties {
|
|||
* Create a ApiManagementServiceSkuProperties.
|
||||
* @property {string} name Name of the Sku. Possible values include:
|
||||
* 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption'
|
||||
* @property {number} [capacity] Capacity of the SKU (number of deployed
|
||||
* units of the SKU).
|
||||
* @property {number} capacity Capacity of the SKU (number of deployed units
|
||||
* of the SKU). For Consumption SKU capacity must be specified as 0.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ class ApiManagementServiceSkuProperties {
|
|||
}
|
||||
},
|
||||
capacity: {
|
||||
required: false,
|
||||
required: true,
|
||||
serializedName: 'capacity',
|
||||
type: {
|
||||
name: 'Number'
|
||||
|
|
|
@ -40,6 +40,8 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
* API Management service.
|
||||
* @property {string} [scmUrl] SCM endpoint URL of the API Management
|
||||
* service.
|
||||
* @property {string} [developerPortalUrl] DEveloper Portal endpoint URL of
|
||||
* the API Management service.
|
||||
* @property {array} [hostnameConfigurations] Custom hostname configuration
|
||||
* of the API Management service.
|
||||
* @property {array} [publicIPAddresses] Public Static Load Balanced IP
|
||||
|
@ -61,14 +63,38 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
* @property {array} [additionalLocations] Additional datacenter locations of
|
||||
* the API Management service.
|
||||
* @property {object} [customProperties] Custom properties of the API
|
||||
* Management service. Setting
|
||||
* Management service.</br>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
|
||||
* and 1.2).</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`
|
||||
* can be used to disable just TLS 1.1 and setting
|
||||
* can be used to disable just TLS 1.1.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`
|
||||
* can be used to disable TLS 1.0 on an API Management service.
|
||||
* can be used to disable TLS 1.0 on an API Management service.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`
|
||||
* can be used to disable just TLS 1.1 for communications with
|
||||
* backends.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`
|
||||
* can be used to disable TLS 1.0 for communications with
|
||||
* backends.</br>Setting
|
||||
* `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can
|
||||
* be used to enable HTTP2 protocol on an API Management service.</br>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
|
||||
* 1st 2018 and `False` otherwise. Http2 setting's default value is
|
||||
* `False`.</br></br>You can disable any of next 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: next ciphers can't be
|
||||
* disabled since they are required by Azure CloudService internal
|
||||
* components:
|
||||
* 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,TLS_RSA_WITH_AES_256_GCM_SHA384
|
||||
* @property {array} [certificates] List of Certificates that need to be
|
||||
* installed in the API Management service. Max supported certificates that
|
||||
* can be installed is 10.
|
||||
|
@ -77,6 +103,9 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
* presented on each request to the gateway. This also enables the ability to
|
||||
* authenticate the certificate in the policy on the gateway. Default value:
|
||||
* false .
|
||||
* @property {boolean} [disableGateway] Property only valid for an Api
|
||||
* Management service deployed in multiple locations. This can be used to
|
||||
* disable the gateway in master region. Default value: false .
|
||||
* @property {string} [virtualNetworkType] 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
|
||||
|
@ -85,17 +114,33 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
* deployment is setup inside a Virtual Network having an Intranet Facing
|
||||
* Endpoint only. Possible values include: 'None', 'External', 'Internal'.
|
||||
* Default value: 'None' .
|
||||
* @property {object} [apiVersionConstraint] Control Plane Apis version
|
||||
* constraint for the API Management service.
|
||||
* @property {string} [apiVersionConstraint.minApiVersion] Limit control
|
||||
* plane API calls to API Management service with version equal to or newer
|
||||
* than this value.
|
||||
* @property {string} [publisherEmail] Publisher email.
|
||||
* @property {string} [publisherName] Publisher name.
|
||||
* @property {object} [sku] SKU properties of the API Management service.
|
||||
* @property {string} [sku.name] Name of the Sku. Possible values include:
|
||||
* 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption'
|
||||
* @property {number} [sku.capacity] Capacity of the SKU (number of deployed
|
||||
* units of the SKU).
|
||||
* units of the SKU). For Consumption SKU capacity must be specified as 0.
|
||||
* @property {object} [identity] Managed service identity of the Api
|
||||
* Management service.
|
||||
* @property {string} [identity.type] 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. Possible values
|
||||
* include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned',
|
||||
* 'None'
|
||||
* @property {uuid} [identity.principalId] The principal id of the identity.
|
||||
* @property {uuid} [identity.tenantId] The client tenant id of the identity.
|
||||
* @property {object} [identity.userAssignedIdentities] 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}'.
|
||||
* @property {string} [etag] ETag of the resource.
|
||||
*/
|
||||
constructor() {
|
||||
|
@ -228,6 +273,14 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
developerPortalUrl: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.developerPortalUrl',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hostnameConfigurations: {
|
||||
required: false,
|
||||
serializedName: 'properties.hostnameConfigurations',
|
||||
|
@ -333,6 +386,14 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
disableGateway: {
|
||||
required: false,
|
||||
serializedName: 'properties.disableGateway',
|
||||
defaultValue: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
virtualNetworkType: {
|
||||
required: false,
|
||||
serializedName: 'properties.virtualNetworkType',
|
||||
|
@ -341,6 +402,14 @@ class ApiManagementServiceUpdateParameters extends models['ApimResource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
apiVersionConstraint: {
|
||||
required: false,
|
||||
serializedName: 'properties.apiVersionConstraint',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ApiVersionConstraint'
|
||||
}
|
||||
},
|
||||
publisherEmail: {
|
||||
required: false,
|
||||
serializedName: 'properties.publisherEmail',
|
||||
|
|
|
@ -33,10 +33,6 @@ class ApiUpdateContract {
|
|||
* @property {array}
|
||||
* [authenticationSettings.openid.bearerTokenSendingMethods] How to send
|
||||
* token to the server.
|
||||
* @property {boolean} [authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API,
|
||||
* true - API is included into closed products only, false - API is included
|
||||
* into open products alone, null - there is a mix of products.
|
||||
* @property {object} [subscriptionKeyParameterNames] Protocols over which
|
||||
* API is made available.
|
||||
* @property {string} [subscriptionKeyParameterNames.header] Subscription key
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Control Plane Apis version constraint for the API Management service.
|
||||
*
|
||||
*/
|
||||
class ApiVersionConstraint {
|
||||
/**
|
||||
* Create a ApiVersionConstraint.
|
||||
* @property {string} [minApiVersion] Limit control plane API calls to API
|
||||
* Management service with version equal to or newer than this value.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ApiVersionConstraint
|
||||
*
|
||||
* @returns {object} metadata of ApiVersionConstraint
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ApiVersionConstraint',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ApiVersionConstraint',
|
||||
modelProperties: {
|
||||
minApiVersion: {
|
||||
required: false,
|
||||
serializedName: 'minApiVersion',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ApiVersionConstraint;
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Association entity details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class AssociationContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a AssociationContract.
|
||||
* @property {string} [provisioningState] Provisioning state. Possible values
|
||||
* include: 'created'
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of AssociationContract
|
||||
*
|
||||
* @returns {object} metadata of AssociationContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'AssociationContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AssociationContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
required: false,
|
||||
serializedName: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'Enum',
|
||||
allowedValues: [ 'created' ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AssociationContract;
|
|
@ -26,10 +26,6 @@ class AuthenticationSettingsContract {
|
|||
* identifier.
|
||||
* @property {array} [openid.bearerTokenSendingMethods] How to send token to
|
||||
* the server.
|
||||
* @property {boolean} [subscriptionKeyRequired] Specifies whether
|
||||
* subscription key is required during call to this API, true - API is
|
||||
* included into closed products only, false - API is included into open
|
||||
* products alone, null - there is a mix of products.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
@ -63,13 +59,6 @@ class AuthenticationSettingsContract {
|
|||
name: 'Composite',
|
||||
className: 'OpenIdAuthenticationSettingsContract'
|
||||
}
|
||||
},
|
||||
subscriptionKeyRequired: {
|
||||
required: false,
|
||||
serializedName: 'subscriptionKeyRequired',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,8 +43,6 @@ class AuthorizationServerContract extends models['Resource'] {
|
|||
* provided in the form of a string containing space-delimited values.
|
||||
* @property {array} [bearerTokenSendingMethods] Specifies the mechanism by
|
||||
* which access token is passed to the API.
|
||||
* @property {string} [clientSecret] Client or app secret registered with
|
||||
* this authorization server.
|
||||
* @property {string} [resourceOwnerUsername] Can be optionally specified
|
||||
* when resource owner password grant type is supported by this authorization
|
||||
* server. Default resource owner username.
|
||||
|
@ -61,6 +59,9 @@ class AuthorizationServerContract extends models['Resource'] {
|
|||
* client uses to request the access token.
|
||||
* @property {string} clientId Client or app id registered with this
|
||||
* authorization server.
|
||||
* @property {string} [clientSecret] 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.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -190,13 +191,6 @@ class AuthorizationServerContract extends models['Resource'] {
|
|||
}
|
||||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: false,
|
||||
serializedName: 'properties.clientSecret',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resourceOwnerUsername: {
|
||||
required: false,
|
||||
serializedName: 'properties.resourceOwnerUsername',
|
||||
|
@ -256,6 +250,13 @@ class AuthorizationServerContract extends models['Resource'] {
|
|||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: false,
|
||||
serializedName: 'properties.clientSecret',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@ class AuthorizationServerContractBaseProperties {
|
|||
* provided in the form of a string containing space-delimited values.
|
||||
* @property {array} [bearerTokenSendingMethods] Specifies the mechanism by
|
||||
* which access token is passed to the API.
|
||||
* @property {string} [clientSecret] Client or app secret registered with
|
||||
* this authorization server.
|
||||
* @property {string} [resourceOwnerUsername] Can be optionally specified
|
||||
* when resource owner password grant type is supported by this authorization
|
||||
* server. Default resource owner username.
|
||||
|
@ -152,13 +150,6 @@ class AuthorizationServerContractBaseProperties {
|
|||
}
|
||||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: false,
|
||||
serializedName: 'clientSecret',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resourceOwnerUsername: {
|
||||
required: false,
|
||||
serializedName: 'resourceOwnerUsername',
|
||||
|
|
|
@ -43,8 +43,6 @@ class AuthorizationServerUpdateContract extends models['Resource'] {
|
|||
* provided in the form of a string containing space-delimited values.
|
||||
* @property {array} [bearerTokenSendingMethods] Specifies the mechanism by
|
||||
* which access token is passed to the API.
|
||||
* @property {string} [clientSecret] Client or app secret registered with
|
||||
* this authorization server.
|
||||
* @property {string} [resourceOwnerUsername] Can be optionally specified
|
||||
* when resource owner password grant type is supported by this authorization
|
||||
* server. Default resource owner username.
|
||||
|
@ -61,6 +59,9 @@ class AuthorizationServerUpdateContract extends models['Resource'] {
|
|||
* client uses to request the access token.
|
||||
* @property {string} [clientId] Client or app id registered with this
|
||||
* authorization server.
|
||||
* @property {string} [clientSecret] 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.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -190,13 +191,6 @@ class AuthorizationServerUpdateContract extends models['Resource'] {
|
|||
}
|
||||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: false,
|
||||
serializedName: 'properties.clientSecret',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resourceOwnerUsername: {
|
||||
required: false,
|
||||
serializedName: 'properties.resourceOwnerUsername',
|
||||
|
@ -256,6 +250,13 @@ class AuthorizationServerUpdateContract extends models['Resource'] {
|
|||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: false,
|
||||
serializedName: 'properties.clientSecret',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
|
||||
*
|
||||
*/
|
||||
class ClientSecretContract {
|
||||
/**
|
||||
* Create a ClientSecretContract.
|
||||
* @property {string} [clientSecret] Client or app secret used in
|
||||
* IdentityProviders, Aad, OpenID or OAuth.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ClientSecretContract
|
||||
*
|
||||
* @returns {object} metadata of ClientSecretContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ClientSecretContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ClientSecretContract',
|
||||
modelProperties: {
|
||||
clientSecret: {
|
||||
required: false,
|
||||
serializedName: 'clientSecret',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ClientSecretContract;
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Paged list of content items.
|
||||
*
|
||||
*/
|
||||
class ContentItemCollection {
|
||||
/**
|
||||
* Create a ContentItemCollection.
|
||||
* @property {array} [value] Collection of content items.
|
||||
* @property {string} [nextLink] Next page link, if any.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ContentItemCollection
|
||||
*
|
||||
* @returns {object} metadata of ContentItemCollection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ContentItemCollection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ContentItemCollection',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'ContentItemContractElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ContentItemContract'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContentItemCollection;
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Content type contract details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class ContentItemContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a ContentItemContract.
|
||||
* @property {object} [properties] Properties of the content item.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ContentItemContract
|
||||
*
|
||||
* @returns {object} metadata of ContentItemContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ContentItemContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ContentItemContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
properties: {
|
||||
required: false,
|
||||
serializedName: 'properties',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'ObjectElementType',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContentItemContract;
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Paged list of content types.
|
||||
*
|
||||
*/
|
||||
class ContentTypeCollection {
|
||||
/**
|
||||
* Create a ContentTypeCollection.
|
||||
* @property {array} [value] Collection of content types.
|
||||
* @property {string} [nextLink] Next page link, if any.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ContentTypeCollection
|
||||
*
|
||||
* @returns {object} metadata of ContentTypeCollection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ContentTypeCollection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ContentTypeCollection',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'ContentTypeContractElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ContentTypeContract'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContentTypeCollection;
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Content type contract details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class ContentTypeContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a ContentTypeContract.
|
||||
* @property {string} [contentTypeContractId] Content type identifier
|
||||
* @property {string} [contentTypeContractName] Content type name. Must be 1
|
||||
* to 250 characters long.
|
||||
* @property {string} [description] Content type description.
|
||||
* @property {object} [schema] Content type schema.
|
||||
* @property {string} [version] Content type version.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ContentTypeContract
|
||||
*
|
||||
* @returns {object} metadata of ContentTypeContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ContentTypeContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ContentTypeContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
contentTypeContractId: {
|
||||
required: false,
|
||||
serializedName: 'properties.id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
contentTypeContractName: {
|
||||
required: false,
|
||||
serializedName: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
required: false,
|
||||
serializedName: 'properties.description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
schema: {
|
||||
required: false,
|
||||
serializedName: 'properties.schema',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
},
|
||||
version: {
|
||||
required: false,
|
||||
serializedName: 'properties.version',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContentTypeContract;
|
|
@ -53,9 +53,13 @@ class DiagnosticContract extends models['Resource'] {
|
|||
* @property {object} [backend.response.body] Body logging settings.
|
||||
* @property {number} [backend.response.body.bytes] Number of request body
|
||||
* bytes to log.
|
||||
* @property {boolean} [enableHttpCorrelationHeaders] Whether to process
|
||||
* Correlation Headers coming to Api Management Service. Only applicable to
|
||||
* Application Insights diagnostics. Default is true.
|
||||
* @property {boolean} [logClientIp] Log the ClientIP. Default is false.
|
||||
* @property {string} [httpCorrelationProtocol] Sets correlation protocol to
|
||||
* use for Application Insights diagnostics. Possible values include: 'None',
|
||||
* 'Legacy', 'W3C'
|
||||
* @property {string} [verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -137,12 +141,26 @@ class DiagnosticContract extends models['Resource'] {
|
|||
className: 'PipelineDiagnosticSettings'
|
||||
}
|
||||
},
|
||||
enableHttpCorrelationHeaders: {
|
||||
logClientIp: {
|
||||
required: false,
|
||||
serializedName: 'properties.enableHttpCorrelationHeaders',
|
||||
serializedName: 'properties.logClientIp',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
httpCorrelationProtocol: {
|
||||
required: false,
|
||||
serializedName: 'properties.httpCorrelationProtocol',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
verbosity: {
|
||||
required: false,
|
||||
serializedName: 'properties.verbosity',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Paged Gateway list representation.
|
||||
*/
|
||||
class GatewayCollection extends Array {
|
||||
/**
|
||||
* Create a GatewayCollection.
|
||||
* @property {string} [nextLink] Next page link if any.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayCollection
|
||||
*
|
||||
* @returns {object} metadata of GatewayCollection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayCollection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayCollection',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'GatewayContractElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayContract'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayCollection;
|
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Gateway details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class GatewayContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a GatewayContract.
|
||||
* @property {object} [locationData] Gateway location.
|
||||
* @property {string} [locationData.name] A canonical name for the geographic
|
||||
* or physical location.
|
||||
* @property {string} [locationData.city] The city or locality where the
|
||||
* resource is located.
|
||||
* @property {string} [locationData.district] The district, state, or
|
||||
* province where the resource is located.
|
||||
* @property {string} [locationData.countryOrRegion] The country or region
|
||||
* where the resource is located.
|
||||
* @property {string} [description] Gateway description
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayContract
|
||||
*
|
||||
* @returns {object} metadata of GatewayContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
locationData: {
|
||||
required: false,
|
||||
serializedName: 'properties.locationData',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ResourceLocationDataContract'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
required: false,
|
||||
serializedName: 'properties.description',
|
||||
constraints: {
|
||||
MaxLength: 1000
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayContract;
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Paged Gateway hostname configuration list representation.
|
||||
*/
|
||||
class GatewayHostnameConfigurationCollection extends Array {
|
||||
/**
|
||||
* Create a GatewayHostnameConfigurationCollection.
|
||||
* @property {string} [nextLink] Next page link if any.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayHostnameConfigurationCollection
|
||||
*
|
||||
* @returns {object} metadata of GatewayHostnameConfigurationCollection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayHostnameConfigurationCollection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayHostnameConfigurationCollection',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'GatewayHostnameConfigurationContractElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayHostnameConfigurationContract'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayHostnameConfigurationCollection;
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Gateway hostname configuration details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class GatewayHostnameConfigurationContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a GatewayHostnameConfigurationContract.
|
||||
* @property {string} [hostname] Hostname value. Supports valid domain name,
|
||||
* partial or full wildcard
|
||||
* @property {string} [certificateId] Identifier of Certificate entity that
|
||||
* will be used for TLS connection establishment
|
||||
* @property {boolean} [negotiateClientCertificate] Determines whether
|
||||
* gateway requests client certificate
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayHostnameConfigurationContract
|
||||
*
|
||||
* @returns {object} metadata of GatewayHostnameConfigurationContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayHostnameConfigurationContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayHostnameConfigurationContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hostname: {
|
||||
required: false,
|
||||
serializedName: 'properties.hostname',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
certificateId: {
|
||||
required: false,
|
||||
serializedName: 'properties.certificateId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
negotiateClientCertificate: {
|
||||
required: false,
|
||||
serializedName: 'properties.negotiateClientCertificate',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayHostnameConfigurationContract;
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Gateway key regeneration request contract properties.
|
||||
*
|
||||
*/
|
||||
class GatewayKeyRegenerationRequestContract {
|
||||
/**
|
||||
* Create a GatewayKeyRegenerationRequestContract.
|
||||
* @property {string} keyType The Key being regenerated. Possible values
|
||||
* include: 'primary', 'secondary'
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayKeyRegenerationRequestContract
|
||||
*
|
||||
* @returns {object} metadata of GatewayKeyRegenerationRequestContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayKeyRegenerationRequestContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayKeyRegenerationRequestContract',
|
||||
modelProperties: {
|
||||
keyType: {
|
||||
required: true,
|
||||
serializedName: 'keyType',
|
||||
type: {
|
||||
name: 'Enum',
|
||||
allowedValues: [ 'primary', 'secondary' ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayKeyRegenerationRequestContract;
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Gateway authentication keys.
|
||||
*
|
||||
*/
|
||||
class GatewayKeysContract {
|
||||
/**
|
||||
* Create a GatewayKeysContract.
|
||||
* @property {string} [primary] Primary gateway key.
|
||||
* @property {string} [secondary] Secondary gateway key.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayKeysContract
|
||||
*
|
||||
* @returns {object} metadata of GatewayKeysContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayKeysContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayKeysContract',
|
||||
modelProperties: {
|
||||
primary: {
|
||||
required: false,
|
||||
serializedName: 'primary',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
secondary: {
|
||||
required: false,
|
||||
serializedName: 'secondary',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayKeysContract;
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Gateway access token.
|
||||
*
|
||||
*/
|
||||
class GatewayTokenContract {
|
||||
/**
|
||||
* Create a GatewayTokenContract.
|
||||
* @property {string} [value] Shared Access Authentication token value for
|
||||
* the Gateway.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayTokenContract
|
||||
*
|
||||
* @returns {object} metadata of GatewayTokenContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayTokenContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayTokenContract',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayTokenContract;
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Gateway token request contract properties.
|
||||
*
|
||||
*/
|
||||
class GatewayTokenRequestContract {
|
||||
/**
|
||||
* Create a GatewayTokenRequestContract.
|
||||
* @property {string} keyType The Key to be used to generate gateway token.
|
||||
* Possible values include: 'primary', 'secondary'. Default value: 'primary'
|
||||
* .
|
||||
* @property {date} expiry 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.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of GatewayTokenRequestContract
|
||||
*
|
||||
* @returns {object} metadata of GatewayTokenRequestContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'GatewayTokenRequestContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'GatewayTokenRequestContract',
|
||||
modelProperties: {
|
||||
keyType: {
|
||||
required: true,
|
||||
serializedName: 'keyType',
|
||||
defaultValue: 'primary',
|
||||
type: {
|
||||
name: 'Enum',
|
||||
allowedValues: [ 'primary', 'secondary' ]
|
||||
}
|
||||
},
|
||||
expiry: {
|
||||
required: true,
|
||||
serializedName: 'expiry',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GatewayTokenRequestContract;
|
|
@ -20,6 +20,8 @@ class IdentityProviderBaseParameters {
|
|||
* @property {string} [type] Identity Provider Type identifier. Possible
|
||||
* values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad',
|
||||
* 'aadB2C'
|
||||
* @property {string} [signinTenant] The TenantId to use instead of Common
|
||||
* when logging into Active Directory
|
||||
* @property {array} [allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
* @property {string} [authority] OpenID Connect discovery endpoint hostname
|
||||
|
@ -57,6 +59,13 @@ class IdentityProviderBaseParameters {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
signinTenant: {
|
||||
required: false,
|
||||
serializedName: 'signinTenant',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
allowedTenants: {
|
||||
required: false,
|
||||
serializedName: 'allowedTenants',
|
||||
|
|
|
@ -23,6 +23,8 @@ class IdentityProviderContract extends models['Resource'] {
|
|||
* @property {string} [identityProviderContractType] Identity Provider Type
|
||||
* identifier. Possible values include: 'facebook', 'google', 'microsoft',
|
||||
* 'twitter', 'aad', 'aadB2C'
|
||||
* @property {string} [signinTenant] The TenantId to use instead of Common
|
||||
* when logging into Active Directory
|
||||
* @property {array} [allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
* @property {string} [authority] OpenID Connect discovery endpoint hostname
|
||||
|
@ -38,10 +40,11 @@ class IdentityProviderContract extends models['Resource'] {
|
|||
* @property {string} clientId 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.
|
||||
* @property {string} clientSecret Client secret of the Application in
|
||||
* @property {string} [clientSecret] 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.
|
||||
* Public Key for Microsoft. This property will not be filled on 'GET'
|
||||
* operations! Use '/listSecrets' POST request to get the value.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -92,6 +95,13 @@ class IdentityProviderContract extends models['Resource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
signinTenant: {
|
||||
required: false,
|
||||
serializedName: 'properties.signinTenant',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
allowedTenants: {
|
||||
required: false,
|
||||
serializedName: 'properties.allowedTenants',
|
||||
|
@ -167,7 +177,7 @@ class IdentityProviderContract extends models['Resource'] {
|
|||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: true,
|
||||
required: false,
|
||||
serializedName: 'properties.clientSecret',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
|
|
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Identity Provider details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class IdentityProviderCreateContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a IdentityProviderCreateContract.
|
||||
* @property {string} [identityProviderCreateContractType] Identity Provider
|
||||
* Type identifier. Possible values include: 'facebook', 'google',
|
||||
* 'microsoft', 'twitter', 'aad', 'aadB2C'
|
||||
* @property {string} [signinTenant] The TenantId to use instead of Common
|
||||
* when logging into Active Directory
|
||||
* @property {array} [allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
* @property {string} [authority] OpenID Connect discovery endpoint hostname
|
||||
* for AAD or AAD B2C.
|
||||
* @property {string} [signupPolicyName] Signup Policy Name. Only applies to
|
||||
* AAD B2C Identity Provider.
|
||||
* @property {string} [signinPolicyName] Signin Policy Name. Only applies to
|
||||
* AAD B2C Identity Provider.
|
||||
* @property {string} [profileEditingPolicyName] Profile Editing Policy Name.
|
||||
* Only applies to AAD B2C Identity Provider.
|
||||
* @property {string} [passwordResetPolicyName] Password Reset Policy Name.
|
||||
* Only applies to AAD B2C Identity Provider.
|
||||
* @property {string} clientId 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.
|
||||
* @property {string} clientSecret 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.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of IdentityProviderCreateContract
|
||||
*
|
||||
* @returns {object} metadata of IdentityProviderCreateContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'IdentityProviderCreateContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'IdentityProviderCreateContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
identityProviderCreateContractType: {
|
||||
required: false,
|
||||
serializedName: 'properties.type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
signinTenant: {
|
||||
required: false,
|
||||
serializedName: 'properties.signinTenant',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
allowedTenants: {
|
||||
required: false,
|
||||
serializedName: 'properties.allowedTenants',
|
||||
constraints: {
|
||||
MaxItems: 32
|
||||
},
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
authority: {
|
||||
required: false,
|
||||
serializedName: 'properties.authority',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
signupPolicyName: {
|
||||
required: false,
|
||||
serializedName: 'properties.signupPolicyName',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
signinPolicyName: {
|
||||
required: false,
|
||||
serializedName: 'properties.signinPolicyName',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
profileEditingPolicyName: {
|
||||
required: false,
|
||||
serializedName: 'properties.profileEditingPolicyName',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
passwordResetPolicyName: {
|
||||
required: false,
|
||||
serializedName: 'properties.passwordResetPolicyName',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
clientId: {
|
||||
required: true,
|
||||
serializedName: 'properties.clientId',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
clientSecret: {
|
||||
required: true,
|
||||
serializedName: 'properties.clientSecret',
|
||||
constraints: {
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = IdentityProviderCreateContract;
|
|
@ -20,6 +20,8 @@ class IdentityProviderUpdateParameters {
|
|||
* @property {string} [type] Identity Provider Type identifier. Possible
|
||||
* values include: 'facebook', 'google', 'microsoft', 'twitter', 'aad',
|
||||
* 'aadB2C'
|
||||
* @property {string} [signinTenant] The TenantId to use instead of Common
|
||||
* when logging into Active Directory
|
||||
* @property {array} [allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
* @property {string} [authority] OpenID Connect discovery endpoint hostname
|
||||
|
@ -64,6 +66,13 @@ class IdentityProviderUpdateParameters {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
signinTenant: {
|
||||
required: false,
|
||||
serializedName: 'properties.signinTenant',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
allowedTenants: {
|
||||
required: false,
|
||||
serializedName: 'properties.allowedTenants',
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -53,7 +53,6 @@ exports.PipelineDiagnosticSettings = require('./pipelineDiagnosticSettings');
|
|||
exports.SamplingSettings = require('./samplingSettings');
|
||||
exports.DiagnosticContract = require('./diagnosticContract');
|
||||
exports.SchemaContract = require('./schemaContract');
|
||||
exports.SchemaCreateOrUpdateContract = require('./schemaCreateOrUpdateContract');
|
||||
exports.PolicyContract = require('./policyContract');
|
||||
exports.PolicyCollection = require('./policyCollection');
|
||||
exports.ProductContract = require('./productContract');
|
||||
|
@ -72,6 +71,7 @@ exports.ApiCreateOrUpdateParameter = require('./apiCreateOrUpdateParameter');
|
|||
exports.ApiVersionSetEntityBase = require('./apiVersionSetEntityBase');
|
||||
exports.ApiVersionSetUpdateParameters = require('./apiVersionSetUpdateParameters');
|
||||
exports.ApiVersionSetContract = require('./apiVersionSetContract');
|
||||
exports.ClientSecretContract = require('./clientSecretContract');
|
||||
exports.TokenBodyParameterContract = require('./tokenBodyParameterContract');
|
||||
exports.AuthorizationServerContractBaseProperties = require('./authorizationServerContractBaseProperties');
|
||||
exports.AuthorizationServerUpdateContract = require('./authorizationServerUpdateContract');
|
||||
|
@ -101,7 +101,9 @@ exports.VirtualNetworkConfiguration = require('./virtualNetworkConfiguration');
|
|||
exports.ApiManagementServiceSkuProperties = require('./apiManagementServiceSkuProperties');
|
||||
exports.AdditionalLocation = require('./additionalLocation');
|
||||
exports.ApiManagementServiceBackupRestoreParameters = require('./apiManagementServiceBackupRestoreParameters');
|
||||
exports.ApiVersionConstraint = require('./apiVersionConstraint');
|
||||
exports.ApiManagementServiceBaseProperties = require('./apiManagementServiceBaseProperties');
|
||||
exports.UserIdentityProperties = require('./userIdentityProperties');
|
||||
exports.ApiManagementServiceIdentity = require('./apiManagementServiceIdentity');
|
||||
exports.ApimResource = require('./apimResource');
|
||||
exports.ApiManagementServiceResource = require('./apiManagementServiceResource');
|
||||
|
@ -115,6 +117,14 @@ exports.Operation = require('./operation');
|
|||
exports.EmailTemplateParametersContractProperties = require('./emailTemplateParametersContractProperties');
|
||||
exports.EmailTemplateUpdateParameters = require('./emailTemplateUpdateParameters');
|
||||
exports.EmailTemplateContract = require('./emailTemplateContract');
|
||||
exports.AssociationContract = require('./associationContract');
|
||||
exports.GatewayHostnameConfigurationContract = require('./gatewayHostnameConfigurationContract');
|
||||
exports.GatewayTokenContract = require('./gatewayTokenContract');
|
||||
exports.GatewayTokenRequestContract = require('./gatewayTokenRequestContract');
|
||||
exports.GatewayKeyRegenerationRequestContract = require('./gatewayKeyRegenerationRequestContract');
|
||||
exports.GatewayKeysContract = require('./gatewayKeysContract');
|
||||
exports.ResourceLocationDataContract = require('./resourceLocationDataContract');
|
||||
exports.GatewayContract = require('./gatewayContract');
|
||||
exports.UserIdentityContract = require('./userIdentityContract');
|
||||
exports.UserEntityBaseParameters = require('./userEntityBaseParameters');
|
||||
exports.GroupContractProperties = require('./groupContractProperties');
|
||||
|
@ -125,8 +135,14 @@ exports.GroupCreateParameters = require('./groupCreateParameters');
|
|||
exports.IdentityProviderBaseParameters = require('./identityProviderBaseParameters');
|
||||
exports.IdentityProviderUpdateParameters = require('./identityProviderUpdateParameters');
|
||||
exports.IdentityProviderContract = require('./identityProviderContract');
|
||||
exports.IdentityProviderCreateContract = require('./identityProviderCreateContract');
|
||||
exports.LoggerUpdateContract = require('./loggerUpdateContract');
|
||||
exports.LoggerContract = require('./loggerContract');
|
||||
exports.PropertyValueContract = require('./propertyValueContract');
|
||||
exports.NamedValueEntityBaseParameters = require('./namedValueEntityBaseParameters');
|
||||
exports.NamedValueContract = require('./namedValueContract');
|
||||
exports.NamedValueUpdateParameters = require('./namedValueUpdateParameters');
|
||||
exports.NamedValueCreateContract = require('./namedValueCreateContract');
|
||||
exports.ConnectivityStatusContract = require('./connectivityStatusContract');
|
||||
exports.NetworkStatusContract = require('./networkStatusContract');
|
||||
exports.NetworkStatusContractByLocation = require('./networkStatusContractByLocation');
|
||||
|
@ -138,8 +154,9 @@ exports.RecipientsContractProperties = require('./recipientsContractProperties')
|
|||
exports.NotificationContract = require('./notificationContract');
|
||||
exports.OpenidConnectProviderUpdateContract = require('./openidConnectProviderUpdateContract');
|
||||
exports.OpenidConnectProviderContract = require('./openidConnectProviderContract');
|
||||
exports.PolicySnippetContract = require('./policySnippetContract');
|
||||
exports.PolicySnippetsCollection = require('./policySnippetsCollection');
|
||||
exports.PolicyDescriptionContract = require('./policyDescriptionContract');
|
||||
exports.PolicyDescriptionCollection = require('./policyDescriptionCollection');
|
||||
exports.PortalSettingValidationKeyContract = require('./portalSettingValidationKeyContract');
|
||||
exports.RegistrationDelegationSettingsProperties = require('./registrationDelegationSettingsProperties');
|
||||
exports.SubscriptionsDelegationSettingsProperties = require('./subscriptionsDelegationSettingsProperties');
|
||||
exports.PortalDelegationSettings = require('./portalDelegationSettings');
|
||||
|
@ -148,14 +165,13 @@ exports.PortalSignupSettings = require('./portalSignupSettings');
|
|||
exports.PortalSigninSettings = require('./portalSigninSettings');
|
||||
exports.SubscriptionContract = require('./subscriptionContract');
|
||||
exports.ProductUpdateParameters = require('./productUpdateParameters');
|
||||
exports.PropertyEntityBaseParameters = require('./propertyEntityBaseParameters');
|
||||
exports.PropertyUpdateParameters = require('./propertyUpdateParameters');
|
||||
exports.PropertyContract = require('./propertyContract');
|
||||
exports.QuotaCounterValueContractProperties = require('./quotaCounterValueContractProperties');
|
||||
exports.QuotaCounterValueUpdateContract = require('./quotaCounterValueUpdateContract');
|
||||
exports.QuotaCounterContract = require('./quotaCounterContract');
|
||||
exports.QuotaCounterCollection = require('./quotaCounterCollection');
|
||||
exports.RequestReportRecordContract = require('./requestReportRecordContract');
|
||||
exports.ReportRecordContract = require('./reportRecordContract');
|
||||
exports.SubscriptionKeysContract = require('./subscriptionKeysContract');
|
||||
exports.SubscriptionUpdateParameters = require('./subscriptionUpdateParameters');
|
||||
exports.SubscriptionCreateParameters = require('./subscriptionCreateParameters');
|
||||
exports.TagCreateUpdateParameters = require('./tagCreateUpdateParameters');
|
||||
|
@ -173,6 +189,10 @@ exports.UserUpdateParameters = require('./userUpdateParameters');
|
|||
exports.UserCreateParameters = require('./userCreateParameters');
|
||||
exports.ApiRevisionInfoContract = require('./apiRevisionInfoContract');
|
||||
exports.QuotaCounterValueContract = require('./quotaCounterValueContract');
|
||||
exports.ContentTypeContract = require('./contentTypeContract');
|
||||
exports.ContentTypeCollection = require('./contentTypeCollection');
|
||||
exports.ContentItemContract = require('./contentItemContract');
|
||||
exports.ContentItemCollection = require('./contentItemCollection');
|
||||
exports.ApiCollection = require('./apiCollection');
|
||||
exports.TagResourceCollection = require('./tagResourceCollection');
|
||||
exports.ApiRevisionCollection = require('./apiRevisionCollection');
|
||||
|
@ -195,14 +215,16 @@ exports.OperationListResult = require('./operationListResult');
|
|||
exports.ResourceSkuResults = require('./resourceSkuResults');
|
||||
exports.ApiManagementServiceListResult = require('./apiManagementServiceListResult');
|
||||
exports.EmailTemplateCollection = require('./emailTemplateCollection');
|
||||
exports.GatewayCollection = require('./gatewayCollection');
|
||||
exports.GatewayHostnameConfigurationCollection = require('./gatewayHostnameConfigurationCollection');
|
||||
exports.GroupCollection = require('./groupCollection');
|
||||
exports.UserCollection = require('./userCollection');
|
||||
exports.IdentityProviderList = require('./identityProviderList');
|
||||
exports.LoggerCollection = require('./loggerCollection');
|
||||
exports.NamedValueCollection = require('./namedValueCollection');
|
||||
exports.NotificationCollection = require('./notificationCollection');
|
||||
exports.OpenIdConnectProviderCollection = require('./openIdConnectProviderCollection');
|
||||
exports.SubscriptionCollection = require('./subscriptionCollection');
|
||||
exports.PropertyCollection = require('./propertyCollection');
|
||||
exports.RegionListResult = require('./regionListResult');
|
||||
exports.ReportCollection = require('./reportCollection');
|
||||
exports.RequestReportCollection = require('./requestReportCollection');
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Paged NamedValue list representation.
|
||||
*/
|
||||
class NamedValueCollection extends Array {
|
||||
/**
|
||||
* Create a NamedValueCollection.
|
||||
* @property {string} [nextLink] Next page link if any.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of NamedValueCollection
|
||||
*
|
||||
* @returns {object} metadata of NamedValueCollection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'NamedValueCollection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'NamedValueCollection',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'NamedValueContractElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'NamedValueContract'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NamedValueCollection;
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* NamedValue details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class NamedValueContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a NamedValueContract.
|
||||
* @property {array} [tags] Optional tags that when provided can be used to
|
||||
* filter the NamedValue list.
|
||||
* @property {boolean} [secret] Determines whether the value is a secret and
|
||||
* should be encrypted or not. Default value is false.
|
||||
* @property {string} displayName Unique name of NamedValue. It may contain
|
||||
* only letters, digits, period, dash, and underscore characters.
|
||||
* @property {string} [value] 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.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of NamedValueContract
|
||||
*
|
||||
* @returns {object} metadata of NamedValueContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'NamedValueContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'NamedValueContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'properties.tags',
|
||||
constraints: {
|
||||
MaxItems: 32
|
||||
},
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
required: false,
|
||||
serializedName: 'properties.secret',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
required: true,
|
||||
serializedName: 'properties.displayName',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
MinLength: 1,
|
||||
Pattern: /^[A-Za-z0-9-._]+$/
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'properties.value',
|
||||
constraints: {
|
||||
MaxLength: 4096,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NamedValueContract;
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* NamedValue details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class NamedValueCreateContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a NamedValueCreateContract.
|
||||
* @property {array} [tags] Optional tags that when provided can be used to
|
||||
* filter the NamedValue list.
|
||||
* @property {boolean} [secret] Determines whether the value is a secret and
|
||||
* should be encrypted or not. Default value is false.
|
||||
* @property {string} displayName Unique name of NamedValue. It may contain
|
||||
* only letters, digits, period, dash, and underscore characters.
|
||||
* @property {string} value 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.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of NamedValueCreateContract
|
||||
*
|
||||
* @returns {object} metadata of NamedValueCreateContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'NamedValueCreateContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'NamedValueCreateContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'properties.tags',
|
||||
constraints: {
|
||||
MaxItems: 32
|
||||
},
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
required: false,
|
||||
serializedName: 'properties.secret',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
required: true,
|
||||
serializedName: 'properties.displayName',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
MinLength: 1,
|
||||
Pattern: /^[A-Za-z0-9-._]+$/
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
value: {
|
||||
required: true,
|
||||
serializedName: 'properties.value',
|
||||
constraints: {
|
||||
MaxLength: 4096,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NamedValueCreateContract;
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* NamedValue Entity Base Parameters set.
|
||||
*
|
||||
*/
|
||||
class NamedValueEntityBaseParameters {
|
||||
/**
|
||||
* Create a NamedValueEntityBaseParameters.
|
||||
* @property {array} [tags] Optional tags that when provided can be used to
|
||||
* filter the NamedValue list.
|
||||
* @property {boolean} [secret] Determines whether the value is a secret and
|
||||
* should be encrypted or not. Default value is false.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of NamedValueEntityBaseParameters
|
||||
*
|
||||
* @returns {object} metadata of NamedValueEntityBaseParameters
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'NamedValueEntityBaseParameters',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'NamedValueEntityBaseParameters',
|
||||
modelProperties: {
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
constraints: {
|
||||
MaxItems: 32
|
||||
},
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
required: false,
|
||||
serializedName: 'secret',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NamedValueEntityBaseParameters;
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* NamedValue update Parameters.
|
||||
*
|
||||
*/
|
||||
class NamedValueUpdateParameters {
|
||||
/**
|
||||
* Create a NamedValueUpdateParameters.
|
||||
* @property {array} [tags] Optional tags that when provided can be used to
|
||||
* filter the NamedValue list.
|
||||
* @property {boolean} [secret] Determines whether the value is a secret and
|
||||
* should be encrypted or not. Default value is false.
|
||||
* @property {string} [displayName] Unique name of NamedValue. It may contain
|
||||
* only letters, digits, period, dash, and underscore characters.
|
||||
* @property {string} [value] Value of the NamedValue. Can contain policy
|
||||
* expressions. It may not be empty or consist only of whitespace.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of NamedValueUpdateParameters
|
||||
*
|
||||
* @returns {object} metadata of NamedValueUpdateParameters
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'NamedValueUpdateParameters',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'NamedValueUpdateParameters',
|
||||
modelProperties: {
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'properties.tags',
|
||||
constraints: {
|
||||
MaxItems: 32
|
||||
},
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
secret: {
|
||||
required: false,
|
||||
serializedName: 'properties.secret',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
required: false,
|
||||
serializedName: 'properties.displayName',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
MinLength: 1,
|
||||
Pattern: /^[A-Za-z0-9-._]+$/
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'properties.value',
|
||||
constraints: {
|
||||
MaxLength: 4096,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NamedValueUpdateParameters;
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Descriptions of APIM policies.
|
||||
*
|
||||
*/
|
||||
class PolicyDescriptionCollection {
|
||||
/**
|
||||
* Create a PolicyDescriptionCollection.
|
||||
* @property {array} [value] Descriptions of APIM policies.
|
||||
* @property {number} [count] Total record count number.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of PolicyDescriptionCollection
|
||||
*
|
||||
* @returns {object} metadata of PolicyDescriptionCollection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'PolicyDescriptionCollection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PolicyDescriptionCollection',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'PolicyDescriptionContractElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PolicyDescriptionContract'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
count: {
|
||||
required: false,
|
||||
serializedName: 'count',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PolicyDescriptionCollection;
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Policy description details.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class PolicyDescriptionContract extends models['Resource'] {
|
||||
/**
|
||||
* Create a PolicyDescriptionContract.
|
||||
* @property {string} [description] Policy description.
|
||||
* @property {number} [scope] Binary OR value of the Snippet scope.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of PolicyDescriptionContract
|
||||
*
|
||||
* @returns {object} metadata of PolicyDescriptionContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'PolicyDescriptionContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PolicyDescriptionContract',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
scope: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.scope',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PolicyDescriptionContract;
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
|
||||
*
|
||||
*/
|
||||
class PortalSettingValidationKeyContract {
|
||||
/**
|
||||
* Create a PortalSettingValidationKeyContract.
|
||||
* @property {string} [validationKey] This is secret value of the validation
|
||||
* key in portal settings.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of PortalSettingValidationKeyContract
|
||||
*
|
||||
* @returns {object} metadata of PortalSettingValidationKeyContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'PortalSettingValidationKeyContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PortalSettingValidationKeyContract',
|
||||
modelProperties: {
|
||||
validationKey: {
|
||||
required: false,
|
||||
serializedName: 'validationKey',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PortalSettingValidationKeyContract;
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
|
||||
*
|
||||
*/
|
||||
class PropertyValueContract {
|
||||
/**
|
||||
* Create a PropertyValueContract.
|
||||
* @property {string} [value] This is secret value of the NamedValue entity.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of PropertyValueContract
|
||||
*
|
||||
* @returns {object} metadata of PropertyValueContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'PropertyValueContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'PropertyValueContract',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PropertyValueContract;
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Quota counter value details.
|
||||
*
|
||||
*/
|
||||
class QuotaCounterValueUpdateContract {
|
||||
/**
|
||||
* Create a QuotaCounterValueUpdateContract.
|
||||
* @property {number} [callsCount] Number of times Counter was called.
|
||||
* @property {number} [kbTransferred] Data Transferred in KiloBytes.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of QuotaCounterValueUpdateContract
|
||||
*
|
||||
* @returns {object} metadata of QuotaCounterValueUpdateContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'QuotaCounterValueUpdateContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'QuotaCounterValueUpdateContract',
|
||||
modelProperties: {
|
||||
callsCount: {
|
||||
required: false,
|
||||
serializedName: 'properties.callsCount',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
kbTransferred: {
|
||||
required: false,
|
||||
serializedName: 'properties.kbTransferred',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = QuotaCounterValueUpdateContract;
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Resource location data properties.
|
||||
*
|
||||
*/
|
||||
class ResourceLocationDataContract {
|
||||
/**
|
||||
* Create a ResourceLocationDataContract.
|
||||
* @property {string} name A canonical name for the geographic or physical
|
||||
* location.
|
||||
* @property {string} [city] The city or locality where the resource is
|
||||
* located.
|
||||
* @property {string} [district] The district, state, or province where the
|
||||
* resource is located.
|
||||
* @property {string} [countryOrRegion] The country or region where the
|
||||
* resource is located.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ResourceLocationDataContract
|
||||
*
|
||||
* @returns {object} metadata of ResourceLocationDataContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ResourceLocationDataContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ResourceLocationDataContract',
|
||||
modelProperties: {
|
||||
name: {
|
||||
required: true,
|
||||
serializedName: 'name',
|
||||
constraints: {
|
||||
MaxLength: 256
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
city: {
|
||||
required: false,
|
||||
serializedName: 'city',
|
||||
constraints: {
|
||||
MaxLength: 256
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
district: {
|
||||
required: false,
|
||||
serializedName: 'district',
|
||||
constraints: {
|
||||
MaxLength: 256
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
countryOrRegion: {
|
||||
required: false,
|
||||
serializedName: 'countryOrRegion',
|
||||
constraints: {
|
||||
MaxLength: 256
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ResourceLocationDataContract;
|
|
@ -27,7 +27,10 @@ class SchemaContract extends models['Resource'] {
|
|||
* - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> -
|
||||
* `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> -
|
||||
* `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
* @property {object} [document] Properties of the Schema Document.
|
||||
* @property {string} [value] Json escaped string defining the document
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
* @property {object} [definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -78,9 +81,16 @@ class SchemaContract extends models['Resource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
document: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'properties.document',
|
||||
serializedName: 'properties.document.value',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
definitions: {
|
||||
required: false,
|
||||
serializedName: 'properties.document.definitions',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
|
|
|
@ -57,10 +57,14 @@ class SubscriptionContract extends models['Resource'] {
|
|||
* @property {date} [notificationDate] Upcoming subscription expiration
|
||||
* notification date. The date conforms to the following format:
|
||||
* `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
|
||||
* @property {string} primaryKey Subscription primary key.
|
||||
* @property {string} secondaryKey Subscription secondary key.
|
||||
* @property {string} [primaryKey] Subscription primary key. This property
|
||||
* will not be filled on 'GET' operations! Use '/listSecrets' POST request to
|
||||
* get the value.
|
||||
* @property {string} [secondaryKey] Subscription secondary key. This
|
||||
* property will not be filled on 'GET' operations! Use '/listSecrets' POST
|
||||
* request to get the value.
|
||||
* @property {string} [stateComment] Optional subscription comment added by
|
||||
* an administrator.
|
||||
* an administrator when the state is changed to the 'rejected'.
|
||||
* @property {boolean} [allowTracing] Determines whether tracing is enabled
|
||||
*/
|
||||
constructor() {
|
||||
|
@ -175,7 +179,7 @@ class SubscriptionContract extends models['Resource'] {
|
|||
}
|
||||
},
|
||||
primaryKey: {
|
||||
required: true,
|
||||
required: false,
|
||||
serializedName: 'properties.primaryKey',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
|
@ -186,7 +190,7 @@ class SubscriptionContract extends models['Resource'] {
|
|||
}
|
||||
},
|
||||
secondaryKey: {
|
||||
required: true,
|
||||
required: false,
|
||||
serializedName: 'properties.secondaryKey',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Subscription keys.
|
||||
*
|
||||
*/
|
||||
class SubscriptionKeysContract {
|
||||
/**
|
||||
* Create a SubscriptionKeysContract.
|
||||
* @property {string} [primaryKey] Subscription primary key.
|
||||
* @property {string} [secondaryKey] Subscription secondary key.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of SubscriptionKeysContract
|
||||
*
|
||||
* @returns {object} metadata of SubscriptionKeysContract
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'SubscriptionKeysContract',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'SubscriptionKeysContract',
|
||||
modelProperties: {
|
||||
primaryKey: {
|
||||
required: false,
|
||||
serializedName: 'primaryKey',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
secondaryKey: {
|
||||
required: false,
|
||||
serializedName: 'secondaryKey',
|
||||
constraints: {
|
||||
MaxLength: 256,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SubscriptionKeysContract;
|
|
@ -39,7 +39,7 @@ class SubscriptionUpdateParameters {
|
|||
* deactivated. Possible values include: 'suspended', 'active', 'expired',
|
||||
* 'submitted', 'rejected', 'cancelled'
|
||||
* @property {string} [stateComment] Comments describing subscription state
|
||||
* change by the administrator.
|
||||
* change by the administrator when the state is changed to the 'rejected'.
|
||||
* @property {boolean} [allowTracing] Determines whether tracing can be
|
||||
* enabled
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,8 @@ class TagDescriptionContract extends models['Resource'] {
|
|||
* describing the tag.
|
||||
* @property {string} [externalDocsDescription] Description of the external
|
||||
* resources describing the tag.
|
||||
* @property {string} [tagId] Identifier of the tag in the form of
|
||||
* /tags/{tagId}
|
||||
* @property {string} [displayName] Tag name.
|
||||
*/
|
||||
constructor() {
|
||||
|
@ -93,6 +95,13 @@ class TagDescriptionContract extends models['Resource'] {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
tagId: {
|
||||
required: false,
|
||||
serializedName: 'properties.tagId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
displayName: {
|
||||
required: false,
|
||||
serializedName: 'properties.displayName',
|
||||
|
|
|
@ -31,6 +31,9 @@ class UserCreateParameters {
|
|||
* @property {string} lastName Last name.
|
||||
* @property {string} [password] User Password. If no value is provided, a
|
||||
* default password is generated.
|
||||
* @property {string} [appType] Determines the type of application which send
|
||||
* the create user request. Default is legacy portal. Possible values
|
||||
* include: 'portal', 'developerPortal'
|
||||
* @property {string} [confirmation] Determines the type of confirmation
|
||||
* e-mail that will be sent to the newly created user. Possible values
|
||||
* include: 'signup', 'invite'
|
||||
|
@ -122,6 +125,13 @@ class UserCreateParameters {
|
|||
name: 'String'
|
||||
}
|
||||
},
|
||||
appType: {
|
||||
required: false,
|
||||
serializedName: 'properties.appType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
confirmation: {
|
||||
required: false,
|
||||
serializedName: 'properties.confirmation',
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a UserIdentityProperties.
|
||||
*/
|
||||
class UserIdentityProperties {
|
||||
/**
|
||||
* Create a UserIdentityProperties.
|
||||
* @property {string} [principalId] The principal id of user assigned
|
||||
* identity.
|
||||
* @property {string} [clientId] The client id of user assigned identity.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of UserIdentityProperties
|
||||
*
|
||||
* @returns {object} metadata of UserIdentityProperties
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'UserIdentityProperties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'UserIdentityProperties',
|
||||
modelProperties: {
|
||||
principalId: {
|
||||
required: false,
|
||||
serializedName: 'principalId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
clientId: {
|
||||
required: false,
|
||||
serializedName: 'clientId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = UserIdentityProperties;
|
|
@ -628,11 +628,6 @@ function _get(resourceGroupName, serviceName, apiId, options, callback) {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -710,7 +705,7 @@ function _get(resourceGroupName, serviceName, apiId, options, callback) {
|
|||
* @param {string} [parameters.format] Format of the Content in which the API
|
||||
* is getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
*
|
||||
* @param {object} [parameters.wsdlSelector] Criteria to limit import of WSDL
|
||||
* to a subset of the document.
|
||||
|
@ -838,11 +833,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, parameters, opti
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -1517,11 +1507,6 @@ function _listByTags(resourceGroupName, serviceName, options, callback) {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -1599,7 +1584,7 @@ function _listByTags(resourceGroupName, serviceName, options, callback) {
|
|||
* @param {string} [parameters.format] Format of the Content in which the API
|
||||
* is getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
*
|
||||
* @param {object} [parameters.wsdlSelector] Criteria to limit import of WSDL
|
||||
* to a subset of the document.
|
||||
|
@ -2459,11 +2444,6 @@ class Api {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -2541,7 +2521,7 @@ class Api {
|
|||
* @param {string} [parameters.format] Format of the Content in which the API
|
||||
* is getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
*
|
||||
* @param {object} [parameters.wsdlSelector] Criteria to limit import of WSDL
|
||||
* to a subset of the document.
|
||||
|
@ -2625,11 +2605,6 @@ class Api {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -2707,7 +2682,7 @@ class Api {
|
|||
* @param {string} [parameters.format] Format of the Content in which the API
|
||||
* is getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
*
|
||||
* @param {object} [parameters.wsdlSelector] Criteria to limit import of WSDL
|
||||
* to a subset of the document.
|
||||
|
@ -2812,11 +2787,6 @@ class Api {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -2931,11 +2901,6 @@ class Api {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -3313,11 +3278,6 @@ class Api {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -3395,7 +3355,7 @@ class Api {
|
|||
* @param {string} [parameters.format] Format of the Content in which the API
|
||||
* is getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
*
|
||||
* @param {object} [parameters.wsdlSelector] Criteria to limit import of WSDL
|
||||
* to a subset of the document.
|
||||
|
@ -3479,11 +3439,6 @@ class Api {
|
|||
* [parameters.authenticationSettings.openid.bearerTokenSendingMethods] How to
|
||||
* send token to the server.
|
||||
*
|
||||
* @param {boolean} [parameters.authenticationSettings.subscriptionKeyRequired]
|
||||
* Specifies whether subscription key is required during call to this API, true
|
||||
* - API is included into closed products only, false - API is included into
|
||||
* open products alone, null - there is a mix of products.
|
||||
*
|
||||
* @param {object} [parameters.subscriptionKeyParameterNames] Protocols over
|
||||
* which API is made available.
|
||||
*
|
||||
|
@ -3561,7 +3516,7 @@ class Api {
|
|||
* @param {string} [parameters.format] Format of the Content in which the API
|
||||
* is getting imported. Possible values include: 'wadl-xml', 'wadl-link-json',
|
||||
* 'swagger-json', 'swagger-link-json', 'wsdl', 'wsdl-link', 'openapi',
|
||||
* 'openapi+json', 'openapi-link'
|
||||
* 'openapi+json', 'openapi-link', 'openapi+json-link'
|
||||
*
|
||||
* @param {object} [parameters.wsdlSelector] Criteria to limit import of WSDL
|
||||
* to a subset of the document.
|
||||
|
|
|
@ -99,10 +99,6 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -313,10 +309,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, diagnosticId, opti
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (diagnosticId === null || diagnosticId === undefined || typeof diagnosticId.valueOf() !== 'string') {
|
||||
throw new Error('diagnosticId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -498,10 +490,6 @@ function _get(resourceGroupName, serviceName, apiId, diagnosticId, options, call
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (diagnosticId === null || diagnosticId === undefined || typeof diagnosticId.valueOf() !== 'string') {
|
||||
throw new Error('diagnosticId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -673,9 +661,16 @@ function _get(resourceGroupName, serviceName, apiId, diagnosticId, options, call
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -743,10 +738,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, diagnosticId, pa
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (diagnosticId === null || diagnosticId === undefined || typeof diagnosticId.valueOf() !== 'string') {
|
||||
throw new Error('diagnosticId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -959,9 +950,16 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, diagnosticId, pa
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -1028,10 +1026,6 @@ function _update(resourceGroupName, serviceName, apiId, diagnosticId, parameters
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (diagnosticId === null || diagnosticId === undefined || typeof diagnosticId.valueOf() !== 'string') {
|
||||
throw new Error('diagnosticId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1239,10 +1233,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, diagnosticId, ifMa
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (diagnosticId === null || diagnosticId === undefined || typeof diagnosticId.valueOf() !== 'string') {
|
||||
throw new Error('diagnosticId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1857,9 +1847,16 @@ class ApiDiagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1937,9 +1934,16 @@ class ApiDiagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -2040,9 +2044,16 @@ class ApiDiagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -2122,9 +2133,16 @@ class ApiDiagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
|
|
@ -28,7 +28,7 @@ const WebResource = msRest.WebResource;
|
|||
*
|
||||
* @param {string} format Format in which to export the Api Details to the
|
||||
* Storage Blob with Sas Key valid for 5 minutes. Possible values include:
|
||||
* 'Swagger', 'Wsdl', 'Wadl', 'Openapi'
|
||||
* 'Swagger', 'Wsdl', 'Wadl', 'Openapi', 'OpenapiJson'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -232,7 +232,7 @@ class ApiExport {
|
|||
*
|
||||
* @param {string} format Format in which to export the Api Details to the
|
||||
* Storage Blob with Sas Key valid for 5 minutes. Possible values include:
|
||||
* 'Swagger', 'Wsdl', 'Wadl', 'Openapi'
|
||||
* 'Swagger', 'Wsdl', 'Wadl', 'Openapi', 'OpenapiJson'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -273,7 +273,7 @@ class ApiExport {
|
|||
*
|
||||
* @param {string} format Format in which to export the Api Details to the
|
||||
* Storage Blob with Sas Key valid for 5 minutes. Possible values include:
|
||||
* 'Swagger', 'Wsdl', 'Wadl', 'Openapi'
|
||||
* 'Swagger', 'Wsdl', 'Wadl', 'Openapi', 'OpenapiJson'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
|
|
@ -104,10 +104,6 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -324,10 +320,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, issueId, options,
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -513,10 +505,6 @@ function _get(resourceGroupName, serviceName, apiId, issueId, options, callback)
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -743,10 +731,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, issueId, paramet
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1006,10 +990,6 @@ function _update(resourceGroupName, serviceName, apiId, issueId, parameters, ifM
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1217,10 +1197,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, issueId, ifMatch,
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -104,10 +104,6 @@ function _listByService(resourceGroupName, serviceName, apiId, issueId, options,
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -339,10 +335,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, issueId, attachmen
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -547,10 +539,6 @@ function _get(resourceGroupName, serviceName, apiId, issueId, attachmentId, opti
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -787,10 +775,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, issueId, attachm
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1053,10 +1037,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, issueId, attachmen
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -104,10 +104,6 @@ function _listByService(resourceGroupName, serviceName, apiId, issueId, options,
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -339,10 +335,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, issueId, commentId
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -546,10 +538,6 @@ function _get(resourceGroupName, serviceName, apiId, issueId, commentId, options
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -783,10 +771,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, issueId, comment
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1049,10 +1033,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, issueId, commentId
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (issueId === null || issueId === undefined || typeof issueId.valueOf() !== 'string') {
|
||||
throw new Error('issueId cannot be null or undefined and it must be of type string.');
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -135,12 +135,13 @@ function _listAvailableServiceSkus(resourceGroupName, serviceName, options, call
|
|||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
|
@ -264,12 +265,13 @@ function _listAvailableServiceSkusNext(nextPageLink, options, callback) {
|
|||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
|
|
|
@ -346,10 +346,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, operationId, optio
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -532,10 +528,6 @@ function _get(resourceGroupName, serviceName, apiId, operationId, options, callb
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -774,10 +766,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, operationId, par
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -1055,10 +1043,6 @@ function _update(resourceGroupName, serviceName, apiId, operationId, parameters,
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -1267,10 +1251,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, operationId, ifMat
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -107,10 +107,6 @@ function _listByOperation(resourceGroupName, serviceName, apiId, operationId, op
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -311,10 +307,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, operationId, optio
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -503,10 +495,6 @@ function _get(resourceGroupName, serviceName, apiId, operationId, options, callb
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (format !== null && format !== undefined && typeof format.valueOf() !== 'string') {
|
||||
throw new Error('format must be of type string.');
|
||||
|
@ -726,10 +714,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, operationId, par
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -974,10 +958,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, operationId, ifMat
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -99,10 +99,6 @@ function _listByApis(resourceGroupName, serviceName, apiId, options, callback) {
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
|
|
@ -102,10 +102,6 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -315,10 +311,6 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, releaseId, options
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (releaseId === null || releaseId === undefined || typeof releaseId.valueOf() !== 'string') {
|
||||
throw new Error('releaseId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -500,10 +492,6 @@ function _get(resourceGroupName, serviceName, apiId, releaseId, options, callbac
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (releaseId === null || releaseId === undefined || typeof releaseId.valueOf() !== 'string') {
|
||||
throw new Error('releaseId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -713,10 +701,6 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, releaseId, param
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (releaseId === null || releaseId === undefined || typeof releaseId.valueOf() !== 'string') {
|
||||
throw new Error('releaseId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -965,10 +949,6 @@ function _update(resourceGroupName, serviceName, apiId, releaseId, parameters, i
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (releaseId === null || releaseId === undefined || typeof releaseId.valueOf() !== 'string') {
|
||||
throw new Error('releaseId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1176,10 +1156,6 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, releaseId, ifMatch
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (releaseId === null || releaseId === undefined || typeof releaseId.valueOf() !== 'string') {
|
||||
throw new Error('releaseId cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -99,10 +99,6 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
|
|||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
|
|
@ -628,6 +628,7 @@ function _get(resourceGroupName, serviceName, apiId, schemaId, options, callback
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates or updates schema configuration for the API.
|
||||
*
|
||||
|
@ -653,7 +654,10 @@ function _get(resourceGroupName, serviceName, apiId, schemaId, options, callback
|
|||
* `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
*
|
||||
* @param {string} [parameters.value] Json escaped string defining the document
|
||||
* representing the Schema.
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
*
|
||||
* @param {object} [parameters.definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -683,174 +687,31 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parame
|
|||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined;
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (apiId === null || apiId === undefined || typeof apiId.valueOf() !== 'string') {
|
||||
throw new Error('apiId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (apiId !== null && apiId !== undefined) {
|
||||
if (apiId.length > 256)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MaxLength": 256');
|
||||
}
|
||||
if (apiId.length < 1)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (schemaId === null || schemaId === undefined || typeof schemaId.valueOf() !== 'string') {
|
||||
throw new Error('schemaId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (schemaId !== null && schemaId !== undefined) {
|
||||
if (schemaId.length > 80)
|
||||
{
|
||||
throw new Error('"schemaId" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (schemaId.length < 1)
|
||||
{
|
||||
throw new Error('"schemaId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (schemaId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"schemaId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
}
|
||||
if (ifMatch !== null && ifMatch !== undefined && typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{apiId}', encodeURIComponent(apiId));
|
||||
requestUrl = requestUrl.replace('{schemaId}', encodeURIComponent(schemaId));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
// Send request
|
||||
this.beginCreateOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parameters, options, (err, parsedResult, httpRequest, response) => {
|
||||
if (err) return callback(err);
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'PUT';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (ifMatch !== undefined && ifMatch !== null) {
|
||||
httpRequest.headers['If-Match'] = ifMatch;
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Serialize Request
|
||||
let requestContent = null;
|
||||
let requestModel = null;
|
||||
try {
|
||||
if (parameters !== null && parameters !== undefined) {
|
||||
let requestModelMapper = new client.models['SchemaCreateOrUpdateContract']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
} catch (error) {
|
||||
let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
|
||||
`payload - ${JSON.stringify(parameters, null, 2)}.`);
|
||||
return callback(serializationError);
|
||||
}
|
||||
httpRequest.body = requestContent;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200 && statusCode !== 201) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
let initialResult = new msRest.HttpOperationResponse();
|
||||
initialResult.request = httpRequest;
|
||||
initialResult.response = response;
|
||||
initialResult.body = response.body;
|
||||
client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => {
|
||||
if (err) return callback(err);
|
||||
|
||||
// Create Result
|
||||
let result = null;
|
||||
|
||||
httpRequest = pollingResult.request;
|
||||
response = pollingResult.response;
|
||||
let responseBody = pollingResult.body;
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
|
||||
// Deserialize Response
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
|
@ -865,26 +726,9 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parame
|
|||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
// Deserialize Response
|
||||
if (statusCode === 201) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['SchemaContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError1.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError1.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError1);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1093,6 +937,269 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, schemaId, ifMatch,
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates schema configuration for the API.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} 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 {string} schemaId Schema identifier within an API. Must be unique in
|
||||
* the current API Management service instance.
|
||||
*
|
||||
* @param {object} parameters The schema contents to apply.
|
||||
*
|
||||
* @param {string} parameters.contentType 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). </br> - `Swagger` Schema
|
||||
* use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL`
|
||||
* Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema
|
||||
* use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use
|
||||
* `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
*
|
||||
* @param {string} [parameters.value] Json escaped string defining the document
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
*
|
||||
* @param {object} [parameters.definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
* creating an entity, but required when updating an entity.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link SchemaContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _beginCreateOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parameters, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined;
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (apiId === null || apiId === undefined || typeof apiId.valueOf() !== 'string') {
|
||||
throw new Error('apiId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (apiId !== null && apiId !== undefined) {
|
||||
if (apiId.length > 256)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MaxLength": 256');
|
||||
}
|
||||
if (apiId.length < 1)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (apiId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (schemaId === null || schemaId === undefined || typeof schemaId.valueOf() !== 'string') {
|
||||
throw new Error('schemaId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (schemaId !== null && schemaId !== undefined) {
|
||||
if (schemaId.length > 80)
|
||||
{
|
||||
throw new Error('"schemaId" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (schemaId.length < 1)
|
||||
{
|
||||
throw new Error('"schemaId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (schemaId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"schemaId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
}
|
||||
if (ifMatch !== null && ifMatch !== undefined && typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{apiId}', encodeURIComponent(apiId));
|
||||
requestUrl = requestUrl.replace('{schemaId}', encodeURIComponent(schemaId));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'PUT';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (ifMatch !== undefined && ifMatch !== null) {
|
||||
httpRequest.headers['If-Match'] = ifMatch;
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Serialize Request
|
||||
let requestContent = null;
|
||||
let requestModel = null;
|
||||
try {
|
||||
if (parameters !== null && parameters !== undefined) {
|
||||
let requestModelMapper = new client.models['SchemaContract']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
} catch (error) {
|
||||
let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
|
||||
`payload - ${JSON.stringify(parameters, null, 2)}.`);
|
||||
return callback(serializationError);
|
||||
}
|
||||
httpRequest.body = requestContent;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['SchemaContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
// Deserialize Response
|
||||
if (statusCode === 201) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['SchemaContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError1.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError1.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError1);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the schema configuration at the API level.
|
||||
*
|
||||
|
@ -1234,6 +1341,7 @@ class ApiSchema {
|
|||
this._get = _get;
|
||||
this._createOrUpdate = _createOrUpdate;
|
||||
this._deleteMethod = _deleteMethod;
|
||||
this._beginCreateOrUpdate = _beginCreateOrUpdate;
|
||||
this._listByApiNext = _listByApiNext;
|
||||
}
|
||||
|
||||
|
@ -1577,7 +1685,10 @@ class ApiSchema {
|
|||
* `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
*
|
||||
* @param {string} [parameters.value] Json escaped string defining the document
|
||||
* representing the Schema.
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
*
|
||||
* @param {object} [parameters.definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1632,7 +1743,10 @@ class ApiSchema {
|
|||
* `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
*
|
||||
* @param {string} [parameters.value] Json escaped string defining the document
|
||||
* representing the Schema.
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
*
|
||||
* @param {object} [parameters.definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1797,6 +1911,144 @@ class ApiSchema {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates schema configuration for the API.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} 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 {string} schemaId Schema identifier within an API. Must be unique in
|
||||
* the current API Management service instance.
|
||||
*
|
||||
* @param {object} parameters The schema contents to apply.
|
||||
*
|
||||
* @param {string} parameters.contentType 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). </br> - `Swagger` Schema
|
||||
* use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL`
|
||||
* Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema
|
||||
* use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use
|
||||
* `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
*
|
||||
* @param {string} [parameters.value] Json escaped string defining the document
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
*
|
||||
* @param {object} [parameters.definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
* creating an entity, but required when updating an entity.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<SchemaContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, serviceName, apiId, schemaId, parameters, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._beginCreateOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parameters, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates schema configuration for the API.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} 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 {string} schemaId Schema identifier within an API. Must be unique in
|
||||
* the current API Management service instance.
|
||||
*
|
||||
* @param {object} parameters The schema contents to apply.
|
||||
*
|
||||
* @param {string} parameters.contentType 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). </br> - `Swagger` Schema
|
||||
* use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL`
|
||||
* Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema
|
||||
* use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use
|
||||
* `application/vnd.ms-azure-apim.wadl.grammars+xml`.
|
||||
*
|
||||
* @param {string} [parameters.value] Json escaped string defining the document
|
||||
* representing the Schema. Used for schemas other than Swagger/OpenAPI.
|
||||
*
|
||||
* @param {object} [parameters.definitions] Types definitions. Used for
|
||||
* Swagger/OpenAPI schemas only, null otherwise.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
* creating an entity, but required when updating an entity.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {SchemaContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link SchemaContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
beginCreateOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parameters, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._beginCreateOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parameters, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._beginCreateOrUpdate(resourceGroupName, serviceName, apiId, schemaId, parameters, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the schema configuration at the API level.
|
||||
*
|
||||
|
|
|
@ -254,8 +254,8 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -274,7 +274,7 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, callback) {
|
||||
function _getEntityTag(resourceGroupName, serviceName, apiId, tagDescriptionId, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
|
@ -323,21 +323,21 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, ca
|
|||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
if (tagDescriptionId === null || tagDescriptionId === undefined || typeof tagDescriptionId.valueOf() !== 'string') {
|
||||
throw new Error('tagDescriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (tagId !== null && tagId !== undefined) {
|
||||
if (tagId.length > 80)
|
||||
if (tagDescriptionId !== null && tagDescriptionId !== undefined) {
|
||||
if (tagDescriptionId.length > 80)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MaxLength": 80');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (tagId.length < 1)
|
||||
if (tagDescriptionId.length < 1)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MinLength": 1');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (tagId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
if (tagDescriptionId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
|
@ -355,11 +355,11 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, ca
|
|||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}';
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{apiId}', encodeURIComponent(apiId));
|
||||
requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId));
|
||||
requestUrl = requestUrl.replace('{tagDescriptionId}', encodeURIComponent(tagDescriptionId));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
|
@ -439,8 +439,8 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, ca
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -461,7 +461,7 @@ function _getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, ca
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _get(resourceGroupName, serviceName, apiId, tagId, options, callback) {
|
||||
function _get(resourceGroupName, serviceName, apiId, tagDescriptionId, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
|
@ -510,21 +510,21 @@ function _get(resourceGroupName, serviceName, apiId, tagId, options, callback) {
|
|||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
if (tagDescriptionId === null || tagDescriptionId === undefined || typeof tagDescriptionId.valueOf() !== 'string') {
|
||||
throw new Error('tagDescriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (tagId !== null && tagId !== undefined) {
|
||||
if (tagId.length > 80)
|
||||
if (tagDescriptionId !== null && tagDescriptionId !== undefined) {
|
||||
if (tagDescriptionId.length > 80)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MaxLength": 80');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (tagId.length < 1)
|
||||
if (tagDescriptionId.length < 1)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MinLength": 1');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (tagId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
if (tagDescriptionId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
|
@ -542,11 +542,11 @@ function _get(resourceGroupName, serviceName, apiId, tagId, options, callback) {
|
|||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}';
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{apiId}', encodeURIComponent(apiId));
|
||||
requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId));
|
||||
requestUrl = requestUrl.replace('{tagDescriptionId}', encodeURIComponent(tagDescriptionId));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
|
@ -643,8 +643,8 @@ function _get(resourceGroupName, serviceName, apiId, tagId, options, callback) {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} parameters Create parameters.
|
||||
*
|
||||
|
@ -678,7 +678,7 @@ function _get(resourceGroupName, serviceName, apiId, tagId, options, callback) {
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameters, options, callback) {
|
||||
function _createOrUpdate(resourceGroupName, serviceName, apiId, tagDescriptionId, parameters, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
|
@ -728,21 +728,21 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameter
|
|||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
if (tagDescriptionId === null || tagDescriptionId === undefined || typeof tagDescriptionId.valueOf() !== 'string') {
|
||||
throw new Error('tagDescriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (tagId !== null && tagId !== undefined) {
|
||||
if (tagId.length > 80)
|
||||
if (tagDescriptionId !== null && tagDescriptionId !== undefined) {
|
||||
if (tagDescriptionId.length > 80)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MaxLength": 80');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (tagId.length < 1)
|
||||
if (tagDescriptionId.length < 1)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MinLength": 1');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (tagId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
if (tagDescriptionId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
|
@ -766,11 +766,11 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameter
|
|||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}';
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{apiId}', encodeURIComponent(apiId));
|
||||
requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId));
|
||||
requestUrl = requestUrl.replace('{tagDescriptionId}', encodeURIComponent(tagDescriptionId));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
|
@ -901,8 +901,8 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameter
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -925,7 +925,7 @@ function _createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameter
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, options, callback) {
|
||||
function _deleteMethod(resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
|
@ -974,21 +974,21 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, op
|
|||
throw new Error('"apiId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
if (tagDescriptionId === null || tagDescriptionId === undefined || typeof tagDescriptionId.valueOf() !== 'string') {
|
||||
throw new Error('tagDescriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (tagId !== null && tagId !== undefined) {
|
||||
if (tagId.length > 80)
|
||||
if (tagDescriptionId !== null && tagDescriptionId !== undefined) {
|
||||
if (tagDescriptionId.length > 80)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MaxLength": 80');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (tagId.length < 1)
|
||||
if (tagDescriptionId.length < 1)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "MinLength": 1');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (tagId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
if (tagDescriptionId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"tagId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
throw new Error('"tagDescriptionId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
|
@ -1009,11 +1009,11 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, op
|
|||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagId}';
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{apiId}', encodeURIComponent(apiId));
|
||||
requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId));
|
||||
requestUrl = requestUrl.replace('{tagDescriptionId}', encodeURIComponent(tagDescriptionId));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
|
@ -1364,8 +1364,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1378,11 +1378,11 @@ class ApiTagDescription {
|
|||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
getEntityTagWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagId, options) {
|
||||
getEntityTagWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagDescriptionId, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, (err, result, request, response) => {
|
||||
self._getEntityTag(resourceGroupName, serviceName, apiId, tagDescriptionId, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
|
@ -1403,8 +1403,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1432,7 +1432,7 @@ class ApiTagDescription {
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, optionalCallback) {
|
||||
getEntityTag(resourceGroupName, serviceName, apiId, tagDescriptionId, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
|
@ -1441,14 +1441,14 @@ class ApiTagDescription {
|
|||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, (err, result, request, response) => {
|
||||
self._getEntityTag(resourceGroupName, serviceName, apiId, tagDescriptionId, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._getEntityTag(resourceGroupName, serviceName, apiId, tagId, options, optionalCallback);
|
||||
return self._getEntityTag(resourceGroupName, serviceName, apiId, tagDescriptionId, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1463,8 +1463,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1477,11 +1477,11 @@ class ApiTagDescription {
|
|||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
getWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagId, options) {
|
||||
getWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagDescriptionId, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._get(resourceGroupName, serviceName, apiId, tagId, options, (err, result, request, response) => {
|
||||
self._get(resourceGroupName, serviceName, apiId, tagDescriptionId, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
|
@ -1502,8 +1502,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1533,7 +1533,7 @@ class ApiTagDescription {
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
get(resourceGroupName, serviceName, apiId, tagId, options, optionalCallback) {
|
||||
get(resourceGroupName, serviceName, apiId, tagDescriptionId, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
|
@ -1542,14 +1542,14 @@ class ApiTagDescription {
|
|||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._get(resourceGroupName, serviceName, apiId, tagId, options, (err, result, request, response) => {
|
||||
self._get(resourceGroupName, serviceName, apiId, tagDescriptionId, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._get(resourceGroupName, serviceName, apiId, tagId, options, optionalCallback);
|
||||
return self._get(resourceGroupName, serviceName, apiId, tagDescriptionId, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1564,8 +1564,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} parameters Create parameters.
|
||||
*
|
||||
|
@ -1591,11 +1591,11 @@ class ApiTagDescription {
|
|||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
createOrUpdateWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagId, parameters, options) {
|
||||
createOrUpdateWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagDescriptionId, parameters, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameters, options, (err, result, request, response) => {
|
||||
self._createOrUpdate(resourceGroupName, serviceName, apiId, tagDescriptionId, parameters, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
|
@ -1616,8 +1616,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {object} parameters Create parameters.
|
||||
*
|
||||
|
@ -1660,7 +1660,7 @@ class ApiTagDescription {
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameters, options, optionalCallback) {
|
||||
createOrUpdate(resourceGroupName, serviceName, apiId, tagDescriptionId, parameters, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
|
@ -1669,14 +1669,14 @@ class ApiTagDescription {
|
|||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameters, options, (err, result, request, response) => {
|
||||
self._createOrUpdate(resourceGroupName, serviceName, apiId, tagDescriptionId, parameters, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._createOrUpdate(resourceGroupName, serviceName, apiId, tagId, parameters, options, optionalCallback);
|
||||
return self._createOrUpdate(resourceGroupName, serviceName, apiId, tagDescriptionId, parameters, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1691,8 +1691,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -1709,11 +1709,11 @@ class ApiTagDescription {
|
|||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
deleteMethodWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagId, ifMatch, options) {
|
||||
deleteMethodWithHttpOperationResponse(resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, options, (err, result, request, response) => {
|
||||
self._deleteMethod(resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
|
@ -1734,8 +1734,8 @@ class ApiTagDescription {
|
|||
* API Management service instance. Non-current revision has ;rev=n as a suffix
|
||||
* where n is the revision number.
|
||||
*
|
||||
* @param {string} tagId Tag identifier. Must be unique in the current API
|
||||
* Management service instance.
|
||||
* @param {string} tagDescriptionId Tag description identifier. Used when
|
||||
* creating tagDescription for API/Tag association. Based on API and Tag names.
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -1767,7 +1767,7 @@ class ApiTagDescription {
|
|||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, options, optionalCallback) {
|
||||
deleteMethod(resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
|
@ -1776,14 +1776,14 @@ class ApiTagDescription {
|
|||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, options, (err, result, request, response) => {
|
||||
self._deleteMethod(resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._deleteMethod(resourceGroupName, serviceName, apiId, tagId, ifMatch, options, optionalCallback);
|
||||
return self._deleteMethod(resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -607,9 +607,6 @@ function _get(resourceGroupName, serviceName, authsid, options, callback) {
|
|||
* @param {array} [parameters.bearerTokenSendingMethods] Specifies the
|
||||
* mechanism by which access token is passed to the API.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] Client or app secret registered
|
||||
* with this authorization server.
|
||||
*
|
||||
* @param {string} [parameters.resourceOwnerUsername] Can be optionally
|
||||
* specified when resource owner password grant type is supported by this
|
||||
* authorization server. Default resource owner username.
|
||||
|
@ -634,6 +631,10 @@ function _get(resourceGroupName, serviceName, authsid, options, callback) {
|
|||
* @param {string} parameters.clientId Client or app id registered with this
|
||||
* authorization server.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] 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.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
|
@ -892,9 +893,6 @@ function _createOrUpdate(resourceGroupName, serviceName, authsid, parameters, op
|
|||
* @param {array} [parameters.bearerTokenSendingMethods] Specifies the
|
||||
* mechanism by which access token is passed to the API.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] Client or app secret registered
|
||||
* with this authorization server.
|
||||
*
|
||||
* @param {string} [parameters.resourceOwnerUsername] Can be optionally
|
||||
* specified when resource owner password grant type is supported by this
|
||||
* authorization server. Default resource owner username.
|
||||
|
@ -919,6 +917,10 @@ function _createOrUpdate(resourceGroupName, serviceName, authsid, parameters, op
|
|||
* @param {string} [parameters.clientId] Client or app id registered with this
|
||||
* authorization server.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] 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.
|
||||
*
|
||||
* @param {string} 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.
|
||||
|
@ -1271,6 +1273,186 @@ function _deleteMethod(resourceGroupName, serviceName, authsid, ifMatch, options
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the authorization server.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} authsid Identifier of the authorization server.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link ClientSecretContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listSecrets(resourceGroupName, serviceName, authsid, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (authsid === null || authsid === undefined || typeof authsid.valueOf() !== 'string') {
|
||||
throw new Error('authsid cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (authsid !== null && authsid !== undefined) {
|
||||
if (authsid.length > 80)
|
||||
{
|
||||
throw new Error('"authsid" should satisfy the constraint - "MaxLength": 80');
|
||||
}
|
||||
if (authsid.length < 1)
|
||||
{
|
||||
throw new Error('"authsid" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (authsid.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"authsid" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{authsid}', encodeURIComponent(authsid));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['ClientSecretContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists a collection of authorization servers defined within a service
|
||||
* instance.
|
||||
|
@ -1415,6 +1597,7 @@ class AuthorizationServer {
|
|||
this._createOrUpdate = _createOrUpdate;
|
||||
this._update = _update;
|
||||
this._deleteMethod = _deleteMethod;
|
||||
this._listSecrets = _listSecrets;
|
||||
this._listByServiceNext = _listByServiceNext;
|
||||
}
|
||||
|
||||
|
@ -1754,9 +1937,6 @@ class AuthorizationServer {
|
|||
* @param {array} [parameters.bearerTokenSendingMethods] Specifies the
|
||||
* mechanism by which access token is passed to the API.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] Client or app secret registered
|
||||
* with this authorization server.
|
||||
*
|
||||
* @param {string} [parameters.resourceOwnerUsername] Can be optionally
|
||||
* specified when resource owner password grant type is supported by this
|
||||
* authorization server. Default resource owner username.
|
||||
|
@ -1781,6 +1961,10 @@ class AuthorizationServer {
|
|||
* @param {string} parameters.clientId Client or app id registered with this
|
||||
* authorization server.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] 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.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
|
@ -1852,9 +2036,6 @@ class AuthorizationServer {
|
|||
* @param {array} [parameters.bearerTokenSendingMethods] Specifies the
|
||||
* mechanism by which access token is passed to the API.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] Client or app secret registered
|
||||
* with this authorization server.
|
||||
*
|
||||
* @param {string} [parameters.resourceOwnerUsername] Can be optionally
|
||||
* specified when resource owner password grant type is supported by this
|
||||
* authorization server. Default resource owner username.
|
||||
|
@ -1879,6 +2060,10 @@ class AuthorizationServer {
|
|||
* @param {string} parameters.clientId Client or app id registered with this
|
||||
* authorization server.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] 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.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
|
@ -1972,9 +2157,6 @@ class AuthorizationServer {
|
|||
* @param {array} [parameters.bearerTokenSendingMethods] Specifies the
|
||||
* mechanism by which access token is passed to the API.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] Client or app secret registered
|
||||
* with this authorization server.
|
||||
*
|
||||
* @param {string} [parameters.resourceOwnerUsername] Can be optionally
|
||||
* specified when resource owner password grant type is supported by this
|
||||
* authorization server. Default resource owner username.
|
||||
|
@ -1999,6 +2181,10 @@ class AuthorizationServer {
|
|||
* @param {string} [parameters.clientId] Client or app id registered with this
|
||||
* authorization server.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] 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.
|
||||
*
|
||||
* @param {string} 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.
|
||||
|
@ -2070,9 +2256,6 @@ class AuthorizationServer {
|
|||
* @param {array} [parameters.bearerTokenSendingMethods] Specifies the
|
||||
* mechanism by which access token is passed to the API.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] Client or app secret registered
|
||||
* with this authorization server.
|
||||
*
|
||||
* @param {string} [parameters.resourceOwnerUsername] Can be optionally
|
||||
* specified when resource owner password grant type is supported by this
|
||||
* authorization server. Default resource owner username.
|
||||
|
@ -2097,6 +2280,10 @@ class AuthorizationServer {
|
|||
* @param {string} [parameters.clientId] Client or app id registered with this
|
||||
* authorization server.
|
||||
*
|
||||
* @param {string} [parameters.clientSecret] 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.
|
||||
*
|
||||
* @param {string} 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.
|
||||
|
@ -2244,6 +2431,96 @@ class AuthorizationServer {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the authorization server.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} authsid Identifier of the authorization server.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<ClientSecretContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listSecretsWithHttpOperationResponse(resourceGroupName, serviceName, authsid, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, authsid, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the authorization server.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} authsid Identifier of the authorization server.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {ClientSecretContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link ClientSecretContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listSecrets(resourceGroupName, serviceName, authsid, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, authsid, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listSecrets(resourceGroupName, serviceName, authsid, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists a collection of authorization servers defined within a service
|
||||
* instance.
|
||||
|
|
|
@ -292,10 +292,6 @@ function _getEntityTag(resourceGroupName, serviceName, backendId, options, callb
|
|||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (backendId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -456,10 +452,6 @@ function _get(resourceGroupName, serviceName, backendId, options, callback) {
|
|||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (backendId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -723,10 +715,6 @@ function _createOrUpdate(resourceGroupName, serviceName, backendId, parameters,
|
|||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (backendId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -1029,10 +1017,6 @@ function _update(resourceGroupName, serviceName, backendId, parameters, ifMatch,
|
|||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (backendId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -1219,10 +1203,6 @@ function _deleteMethod(resourceGroupName, serviceName, backendId, ifMatch, optio
|
|||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (backendId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1397,10 +1377,6 @@ function _reconnect(resourceGroupName, serviceName, backendId, options, callback
|
|||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (backendId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"backendId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -712,6 +712,167 @@ function _createOrUpdate(resourceGroupName, serviceName, parameters, options, ca
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the secret validation key of the DelegationSettings.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link PortalSettingValidationKeyContract} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listSecrets(resourceGroupName, serviceName, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['PortalSettingValidationKeyContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/** Class representing a DelegationSettings. */
|
||||
class DelegationSettings {
|
||||
/**
|
||||
|
@ -724,6 +885,7 @@ class DelegationSettings {
|
|||
this._get = _get;
|
||||
this._update = _update;
|
||||
this._createOrUpdate = _createOrUpdate;
|
||||
this._listSecrets = _listSecrets;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1160,6 +1322,93 @@ class DelegationSettings {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the secret validation key of the DelegationSettings.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<PortalSettingValidationKeyContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listSecretsWithHttpOperationResponse(resourceGroupName, serviceName, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the secret validation key of the DelegationSettings.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {PortalSettingValidationKeyContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link PortalSettingValidationKeyContract} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listSecrets(resourceGroupName, serviceName, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listSecrets(resourceGroupName, serviceName, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = DelegationSettings;
|
||||
|
|
|
@ -607,9 +607,16 @@ function _get(resourceGroupName, serviceName, diagnosticId, options, callback) {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -871,9 +878,16 @@ function _createOrUpdate(resourceGroupName, serviceName, diagnosticId, parameter
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -1709,9 +1723,16 @@ class Diagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1786,9 +1807,16 @@ class Diagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1885,9 +1913,16 @@ class Diagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
@ -1963,9 +1998,16 @@ class Diagnostic {
|
|||
* @param {number} [parameters.backend.response.body.bytes] Number of request
|
||||
* body bytes to log.
|
||||
*
|
||||
* @param {boolean} [parameters.enableHttpCorrelationHeaders] Whether to
|
||||
* process Correlation Headers coming to Api Management Service. Only
|
||||
* applicable to Application Insights diagnostics. Default is true.
|
||||
* @param {boolean} [parameters.logClientIp] Log the ClientIP. Default is
|
||||
* false.
|
||||
*
|
||||
* @param {string} [parameters.httpCorrelationProtocol] Sets correlation
|
||||
* protocol to use for Application Insights diagnostics. Possible values
|
||||
* include: 'None', 'Legacy', 'W3C'
|
||||
*
|
||||
* @param {string} [parameters.verbosity] The verbosity level applied to traces
|
||||
* emitted by trace policies. Possible values include: 'verbose',
|
||||
* 'information', 'error'
|
||||
*
|
||||
* @param {string} ifMatch ETag of the Entity. ETag should match the current
|
||||
* entity state from the header response of the GET request or it should be *
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -292,10 +292,6 @@ function _getEntityTag(resourceGroupName, serviceName, groupId, options, callbac
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -456,10 +452,6 @@ function _get(resourceGroupName, serviceName, groupId, options, callback) {
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -656,10 +648,6 @@ function _createOrUpdate(resourceGroupName, serviceName, groupId, parameters, op
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -895,10 +883,6 @@ function _update(resourceGroupName, serviceName, groupId, parameters, ifMatch, o
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -1085,10 +1069,6 @@ function _deleteMethod(resourceGroupName, serviceName, groupId, ifMatch, options
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -105,10 +105,6 @@ function _list(resourceGroupName, serviceName, groupId, options, callback) {
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -319,10 +315,6 @@ function _checkEntityExists(resourceGroupName, serviceName, groupId, userId, opt
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (userId === null || userId === undefined || typeof userId.valueOf() !== 'string') {
|
||||
throw new Error('userId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -336,10 +328,6 @@ function _checkEntityExists(resourceGroupName, serviceName, groupId, userId, opt
|
|||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (userId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -505,10 +493,6 @@ function _create(resourceGroupName, serviceName, groupId, userId, options, callb
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (userId === null || userId === undefined || typeof userId.valueOf() !== 'string') {
|
||||
throw new Error('userId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -522,10 +506,6 @@ function _create(resourceGroupName, serviceName, groupId, userId, options, callb
|
|||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (userId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -723,10 +703,6 @@ function _deleteMethod(resourceGroupName, serviceName, groupId, userId, options,
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (userId === null || userId === undefined || typeof userId.valueOf() !== 'string') {
|
||||
throw new Error('userId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -740,10 +716,6 @@ function _deleteMethod(resourceGroupName, serviceName, groupId, userId, options,
|
|||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (userId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -509,9 +509,12 @@ function _get(resourceGroupName, serviceName, identityProviderName, options, cal
|
|||
*
|
||||
* @param {object} parameters Create parameters.
|
||||
*
|
||||
* @param {string} [parameters.identityProviderContractType] Identity Provider
|
||||
* Type identifier. Possible values include: 'facebook', 'google', 'microsoft',
|
||||
* 'twitter', 'aad', 'aadB2C'
|
||||
* @param {string} [parameters.identityProviderCreateContractType] Identity
|
||||
* Provider Type identifier. Possible values include: 'facebook', 'google',
|
||||
* 'microsoft', 'twitter', 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {string} [parameters.signinTenant] The TenantId to use instead of
|
||||
* Common when logging into Active Directory
|
||||
*
|
||||
* @param {array} [parameters.allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
|
@ -538,7 +541,8 @@ function _get(resourceGroupName, serviceName, identityProviderName, options, cal
|
|||
* @param {string} parameters.clientSecret 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.
|
||||
* for Microsoft. This property will not be filled on 'GET' operations! Use
|
||||
* '/listSecrets' POST request to get the value.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -658,7 +662,7 @@ function _createOrUpdate(resourceGroupName, serviceName, identityProviderName, p
|
|||
let requestModel = null;
|
||||
try {
|
||||
if (parameters !== null && parameters !== undefined) {
|
||||
let requestModelMapper = new client.models['IdentityProviderContract']().mapper();
|
||||
let requestModelMapper = new client.models['IdentityProviderCreateContract']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
|
@ -759,6 +763,9 @@ function _createOrUpdate(resourceGroupName, serviceName, identityProviderName, p
|
|||
* Possible values include: 'facebook', 'google', 'microsoft', 'twitter',
|
||||
* 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {string} [parameters.signinTenant] The TenantId to use instead of
|
||||
* Common when logging into Active Directory
|
||||
*
|
||||
* @param {array} [parameters.allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
*
|
||||
|
@ -1112,6 +1119,174 @@ function _deleteMethod(resourceGroupName, serviceName, identityProviderName, ifM
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the Identity Provider.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} identityProviderName Identity Provider Type identifier.
|
||||
* Possible values include: 'facebook', 'google', 'microsoft', 'twitter',
|
||||
* 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link ClientSecretContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listSecrets(resourceGroupName, serviceName, identityProviderName, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (identityProviderName === null || identityProviderName === undefined || typeof identityProviderName.valueOf() !== 'string') {
|
||||
throw new Error('identityProviderName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{identityProviderName}', encodeURIComponent(identityProviderName));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['ClientSecretContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists a collection of Identity Provider configured in the specified service
|
||||
* instance.
|
||||
|
@ -1255,6 +1430,7 @@ class IdentityProvider {
|
|||
this._createOrUpdate = _createOrUpdate;
|
||||
this._update = _update;
|
||||
this._deleteMethod = _deleteMethod;
|
||||
this._listSecrets = _listSecrets;
|
||||
this._listByServiceNext = _listByServiceNext;
|
||||
}
|
||||
|
||||
|
@ -1551,9 +1727,12 @@ class IdentityProvider {
|
|||
*
|
||||
* @param {object} parameters Create parameters.
|
||||
*
|
||||
* @param {string} [parameters.identityProviderContractType] Identity Provider
|
||||
* Type identifier. Possible values include: 'facebook', 'google', 'microsoft',
|
||||
* 'twitter', 'aad', 'aadB2C'
|
||||
* @param {string} [parameters.identityProviderCreateContractType] Identity
|
||||
* Provider Type identifier. Possible values include: 'facebook', 'google',
|
||||
* 'microsoft', 'twitter', 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {string} [parameters.signinTenant] The TenantId to use instead of
|
||||
* Common when logging into Active Directory
|
||||
*
|
||||
* @param {array} [parameters.allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
|
@ -1580,7 +1759,8 @@ class IdentityProvider {
|
|||
* @param {string} parameters.clientSecret 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.
|
||||
* for Microsoft. This property will not be filled on 'GET' operations! Use
|
||||
* '/listSecrets' POST request to get the value.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1623,9 +1803,12 @@ class IdentityProvider {
|
|||
*
|
||||
* @param {object} parameters Create parameters.
|
||||
*
|
||||
* @param {string} [parameters.identityProviderContractType] Identity Provider
|
||||
* Type identifier. Possible values include: 'facebook', 'google', 'microsoft',
|
||||
* 'twitter', 'aad', 'aadB2C'
|
||||
* @param {string} [parameters.identityProviderCreateContractType] Identity
|
||||
* Provider Type identifier. Possible values include: 'facebook', 'google',
|
||||
* 'microsoft', 'twitter', 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {string} [parameters.signinTenant] The TenantId to use instead of
|
||||
* Common when logging into Active Directory
|
||||
*
|
||||
* @param {array} [parameters.allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
|
@ -1652,7 +1835,8 @@ class IdentityProvider {
|
|||
* @param {string} parameters.clientSecret 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.
|
||||
* for Microsoft. This property will not be filled on 'GET' operations! Use
|
||||
* '/listSecrets' POST request to get the value.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
|
@ -1722,6 +1906,9 @@ class IdentityProvider {
|
|||
* Possible values include: 'facebook', 'google', 'microsoft', 'twitter',
|
||||
* 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {string} [parameters.signinTenant] The TenantId to use instead of
|
||||
* Common when logging into Active Directory
|
||||
*
|
||||
* @param {array} [parameters.allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
*
|
||||
|
@ -1795,6 +1982,9 @@ class IdentityProvider {
|
|||
* Possible values include: 'facebook', 'google', 'microsoft', 'twitter',
|
||||
* 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {string} [parameters.signinTenant] The TenantId to use instead of
|
||||
* Common when logging into Active Directory
|
||||
*
|
||||
* @param {array} [parameters.allowedTenants] List of Allowed Tenants when
|
||||
* configuring Azure Active Directory login.
|
||||
*
|
||||
|
@ -1973,6 +2163,100 @@ class IdentityProvider {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the Identity Provider.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} identityProviderName Identity Provider Type identifier.
|
||||
* Possible values include: 'facebook', 'google', 'microsoft', 'twitter',
|
||||
* 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<ClientSecretContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listSecretsWithHttpOperationResponse(resourceGroupName, serviceName, identityProviderName, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, identityProviderName, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the Identity Provider.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} identityProviderName Identity Provider Type identifier.
|
||||
* Possible values include: 'facebook', 'google', 'microsoft', 'twitter',
|
||||
* 'aad', 'aadB2C'
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {ClientSecretContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link ClientSecretContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listSecrets(resourceGroupName, serviceName, identityProviderName, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, identityProviderName, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listSecrets(resourceGroupName, serviceName, identityProviderName, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists a collection of Identity Provider configured in the specified service
|
||||
* instance.
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -39,18 +39,22 @@ exports.ApiManagementServiceSkus = require('./apiManagementServiceSkus');
|
|||
exports.ApiManagementService = require('./apiManagementService');
|
||||
exports.Diagnostic = require('./diagnostic');
|
||||
exports.EmailTemplate = require('./emailTemplate');
|
||||
exports.Gateway = require('./gateway');
|
||||
exports.GatewayHostnameConfiguration = require('./gatewayHostnameConfiguration');
|
||||
exports.GatewayApi = require('./gatewayApi');
|
||||
exports.Group = require('./group');
|
||||
exports.GroupUser = require('./groupUser');
|
||||
exports.IdentityProvider = require('./identityProvider');
|
||||
exports.Issue = require('./issue');
|
||||
exports.Logger = require('./logger');
|
||||
exports.NamedValue = require('./namedValue');
|
||||
exports.NetworkStatus = require('./networkStatus');
|
||||
exports.Notification = require('./notification');
|
||||
exports.NotificationRecipientUser = require('./notificationRecipientUser');
|
||||
exports.NotificationRecipientEmail = require('./notificationRecipientEmail');
|
||||
exports.OpenIdConnectProvider = require('./openIdConnectProvider');
|
||||
exports.Policy = require('./policy');
|
||||
exports.PolicySnippet = require('./policySnippet');
|
||||
exports.PolicyDescription = require('./policyDescription');
|
||||
exports.SignInSettings = require('./signInSettings');
|
||||
exports.SignUpSettings = require('./signUpSettings');
|
||||
exports.DelegationSettings = require('./delegationSettings');
|
||||
|
@ -59,7 +63,6 @@ exports.ProductApi = require('./productApi');
|
|||
exports.ProductGroup = require('./productGroup');
|
||||
exports.ProductSubscriptions = require('./productSubscriptions');
|
||||
exports.ProductPolicy = require('./productPolicy');
|
||||
exports.Property = require('./property');
|
||||
exports.QuotaByCounterKeys = require('./quotaByCounterKeys');
|
||||
exports.QuotaByPeriodKeys = require('./quotaByPeriodKeys');
|
||||
exports.Region = require('./region');
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -267,10 +267,6 @@ function _checkEntityExists(resourceGroupName, serviceName, notificationName, us
|
|||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (userId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -442,10 +438,6 @@ function _createOrUpdate(resourceGroupName, serviceName, notificationName, userI
|
|||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (userId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -649,10 +641,6 @@ function _deleteMethod(resourceGroupName, serviceName, notificationName, userId,
|
|||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (userId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"userId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -1162,6 +1162,182 @@ function _deleteMethod(resourceGroupName, serviceName, opid, ifMatch, options, c
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the OpenID Connect Provider.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} opid Identifier of the OpenID Connect Provider.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link ClientSecretContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listSecrets(resourceGroupName, serviceName, opid, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (opid === null || opid === undefined || typeof opid.valueOf() !== 'string') {
|
||||
throw new Error('opid cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (opid !== null && opid !== undefined) {
|
||||
if (opid.length > 256)
|
||||
{
|
||||
throw new Error('"opid" should satisfy the constraint - "MaxLength": 256');
|
||||
}
|
||||
if (opid.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"opid" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{opid}', encodeURIComponent(opid));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['ClientSecretContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists of all the OpenId Connect Providers.
|
||||
*
|
||||
|
@ -1305,6 +1481,7 @@ class OpenIdConnectProvider {
|
|||
this._createOrUpdate = _createOrUpdate;
|
||||
this._update = _update;
|
||||
this._deleteMethod = _deleteMethod;
|
||||
this._listSecrets = _listSecrets;
|
||||
this._listByServiceNext = _listByServiceNext;
|
||||
}
|
||||
|
||||
|
@ -1956,6 +2133,96 @@ class OpenIdConnectProvider {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the OpenID Connect Provider.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} opid Identifier of the OpenID Connect Provider.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<ClientSecretContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listSecretsWithHttpOperationResponse(resourceGroupName, serviceName, opid, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, opid, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret details of the OpenID Connect Provider.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} opid Identifier of the OpenID Connect Provider.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {ClientSecretContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link ClientSecretContract} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listSecrets(resourceGroupName, serviceName, opid, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, opid, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listSecrets(resourceGroupName, serviceName, opid, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists of all the OpenId Connect Providers.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,297 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const msRest = require('ms-rest');
|
||||
const msRestAzure = require('ms-rest-azure');
|
||||
const WebResource = msRest.WebResource;
|
||||
|
||||
/**
|
||||
* Lists all policy descriptions.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.scope] Policy scope. Possible values include:
|
||||
* 'Tenant', 'Product', 'Api', 'Operation', 'All'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link PolicyDescriptionCollection} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listByService(resourceGroupName, serviceName, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let scope = (options && options.scope !== undefined) ? options.scope : undefined;
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (scope) {
|
||||
let allowedValues = [ 'Tenant', 'Product', 'Api', 'Operation', 'All' ];
|
||||
if (!allowedValues.some( function(item) { return item === scope; })) {
|
||||
throw new Error(scope + ' is not a valid value. The valid values are: ' + allowedValues);
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
if (scope !== null && scope !== undefined) {
|
||||
queryParameters.push('scope=' + encodeURIComponent(scope));
|
||||
}
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'GET';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['PolicyDescriptionCollection']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/** Class representing a PolicyDescription. */
|
||||
class PolicyDescription {
|
||||
/**
|
||||
* Create a PolicyDescription.
|
||||
* @param {ApiManagementClient} client Reference to the service client.
|
||||
*/
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
this._listByService = _listByService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all policy descriptions.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.scope] Policy scope. Possible values include:
|
||||
* 'Tenant', 'Product', 'Api', 'Operation', 'All'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<PolicyDescriptionCollection>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listByServiceWithHttpOperationResponse(resourceGroupName, serviceName, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listByService(resourceGroupName, serviceName, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all policy descriptions.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {string} [options.scope] Policy scope. Possible values include:
|
||||
* 'Tenant', 'Product', 'Api', 'Operation', 'All'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {PolicyDescriptionCollection} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link PolicyDescriptionCollection} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listByService(resourceGroupName, serviceName, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listByService(resourceGroupName, serviceName, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listByService(resourceGroupName, serviceName, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = PolicyDescription;
|
|
@ -314,10 +314,6 @@ function _getEntityTag(resourceGroupName, serviceName, productId, options, callb
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -478,10 +474,6 @@ function _get(resourceGroupName, serviceName, productId, options, callback) {
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -700,10 +692,6 @@ function _createOrUpdate(resourceGroupName, serviceName, productId, parameters,
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -961,10 +949,6 @@ function _update(resourceGroupName, serviceName, productId, parameters, ifMatch,
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (parameters === null || parameters === undefined) {
|
||||
throw new Error('parameters cannot be null or undefined.');
|
||||
|
@ -1155,10 +1139,6 @@ function _deleteMethod(resourceGroupName, serviceName, productId, ifMatch, optio
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -104,10 +104,6 @@ function _listByProduct(resourceGroupName, serviceName, productId, options, call
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -319,10 +315,6 @@ function _checkEntityExists(resourceGroupName, serviceName, productId, apiId, op
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (apiId === null || apiId === undefined || typeof apiId.valueOf() !== 'string') {
|
||||
throw new Error('apiId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -505,10 +497,6 @@ function _createOrUpdate(resourceGroupName, serviceName, productId, apiId, optio
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (apiId === null || apiId === undefined || typeof apiId.valueOf() !== 'string') {
|
||||
throw new Error('apiId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -724,10 +712,6 @@ function _deleteMethod(resourceGroupName, serviceName, productId, apiId, options
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (apiId === null || apiId === undefined || typeof apiId.valueOf() !== 'string') {
|
||||
throw new Error('apiId cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -100,10 +100,6 @@ function _listByProduct(resourceGroupName, serviceName, productId, options, call
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -314,10 +310,6 @@ function _checkEntityExists(resourceGroupName, serviceName, productId, groupId,
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (groupId === null || groupId === undefined || typeof groupId.valueOf() !== 'string') {
|
||||
throw new Error('groupId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -331,10 +323,6 @@ function _checkEntityExists(resourceGroupName, serviceName, productId, groupId,
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -500,10 +488,6 @@ function _createOrUpdate(resourceGroupName, serviceName, productId, groupId, opt
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (groupId === null || groupId === undefined || typeof groupId.valueOf() !== 'string') {
|
||||
throw new Error('groupId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -517,10 +501,6 @@ function _createOrUpdate(resourceGroupName, serviceName, productId, groupId, opt
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -718,10 +698,6 @@ function _deleteMethod(resourceGroupName, serviceName, productId, groupId, optio
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (groupId === null || groupId === undefined || typeof groupId.valueOf() !== 'string') {
|
||||
throw new Error('groupId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -735,10 +711,6 @@ function _deleteMethod(resourceGroupName, serviceName, productId, groupId, optio
|
|||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (groupId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"groupId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -86,10 +86,6 @@ function _listByProduct(resourceGroupName, serviceName, productId, options, call
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -267,10 +263,6 @@ function _getEntityTag(resourceGroupName, serviceName, productId, options, callb
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
|
@ -437,10 +429,6 @@ function _get(resourceGroupName, serviceName, productId, options, callback) {
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (format !== null && format !== undefined && typeof format.valueOf() !== 'string') {
|
||||
throw new Error('format must be of type string.');
|
||||
|
@ -638,10 +626,6 @@ function _createOrUpdate(resourceGroupName, serviceName, productId, parameters,
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch !== null && ifMatch !== undefined && typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch must be of type string.');
|
||||
|
@ -864,10 +848,6 @@ function _deleteMethod(resourceGroupName, serviceName, productId, ifMatch, optio
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (ifMatch === null || ifMatch === undefined || typeof ifMatch.valueOf() !== 'string') {
|
||||
throw new Error('ifMatch cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -109,10 +109,6 @@ function _list(resourceGroupName, serviceName, productId, options, callback) {
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
|
|
@ -315,7 +315,7 @@ function _update(resourceGroupName, serviceName, quotaCounterKey, parameters, op
|
|||
let requestModel = null;
|
||||
try {
|
||||
if (parameters !== null && parameters !== undefined) {
|
||||
let requestModelMapper = new client.models['QuotaCounterValueContractProperties']().mapper();
|
||||
let requestModelMapper = new client.models['QuotaCounterValueUpdateContract']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
|
|
|
@ -323,7 +323,7 @@ function _update(resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey
|
|||
let requestModel = null;
|
||||
try {
|
||||
if (parameters !== null && parameters !== undefined) {
|
||||
let requestModelMapper = new client.models['QuotaCounterValueContractProperties']().mapper();
|
||||
let requestModelMapper = new client.models['QuotaCounterValueUpdateContract']().mapper();
|
||||
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
|
||||
requestContent = JSON.stringify(requestModel);
|
||||
}
|
||||
|
|
|
@ -615,6 +615,10 @@ function _get(resourceGroupName, serviceName, sid, options, callback) {
|
|||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
* creating an entity, but required when updating an entity.
|
||||
*
|
||||
* @param {string} [options.appType] Determines the type of application which
|
||||
* send the create user request. Default is legacy publisher portal. Possible
|
||||
* values include: 'portal', 'developerPortal'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
|
@ -643,6 +647,7 @@ function _createOrUpdate(resourceGroupName, serviceName, sid, parameters, option
|
|||
}
|
||||
let notify = (options && options.notify !== undefined) ? options.notify : undefined;
|
||||
let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined;
|
||||
let appType = (options && options.appType !== undefined) ? options.appType : 'portal';
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
|
@ -693,6 +698,9 @@ function _createOrUpdate(resourceGroupName, serviceName, sid, parameters, option
|
|||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (appType !== null && appType !== undefined && typeof appType.valueOf() !== 'string') {
|
||||
throw new Error('appType must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
|
@ -712,6 +720,9 @@ function _createOrUpdate(resourceGroupName, serviceName, sid, parameters, option
|
|||
queryParameters.push('notify=' + encodeURIComponent(notify.toString()));
|
||||
}
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (appType !== null && appType !== undefined) {
|
||||
queryParameters.push('appType=' + encodeURIComponent(appType));
|
||||
}
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -868,7 +879,8 @@ function _createOrUpdate(resourceGroupName, serviceName, sid, parameters, option
|
|||
* 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'
|
||||
*
|
||||
* @param {string} [parameters.stateComment] Comments describing subscription
|
||||
* state change by the administrator.
|
||||
* state change by the administrator when the state is changed to the
|
||||
* 'rejected'.
|
||||
*
|
||||
* @param {boolean} [parameters.allowTracing] Determines whether tracing can be
|
||||
* enabled
|
||||
|
@ -884,6 +896,10 @@ function _createOrUpdate(resourceGroupName, serviceName, sid, parameters, option
|
|||
* subscription
|
||||
* - If true, send email notification of change of state of subscription
|
||||
*
|
||||
* @param {string} [options.appType] Determines the type of application which
|
||||
* send the create user request. Default is legacy publisher portal. Possible
|
||||
* values include: 'portal', 'developerPortal'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
|
@ -910,6 +926,7 @@ function _update(resourceGroupName, serviceName, sid, parameters, ifMatch, optio
|
|||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let notify = (options && options.notify !== undefined) ? options.notify : undefined;
|
||||
let appType = (options && options.appType !== undefined) ? options.appType : 'portal';
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
|
@ -960,6 +977,9 @@ function _update(resourceGroupName, serviceName, sid, parameters, ifMatch, optio
|
|||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (appType !== null && appType !== undefined && typeof appType.valueOf() !== 'string') {
|
||||
throw new Error('appType must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
|
@ -979,6 +999,9 @@ function _update(resourceGroupName, serviceName, sid, parameters, ifMatch, optio
|
|||
queryParameters.push('notify=' + encodeURIComponent(notify.toString()));
|
||||
}
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (appType !== null && appType !== undefined) {
|
||||
queryParameters.push('appType=' + encodeURIComponent(appType));
|
||||
}
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
@ -1550,6 +1573,184 @@ function _regenerateSecondaryKey(resourceGroupName, serviceName, sid, options, c
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subscription keys.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} sid Subscription entity Identifier. The entity represents
|
||||
* the association between a user and a product in API Management.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link SubscriptionKeysContract} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listSecrets(resourceGroupName, serviceName, sid, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (sid === null || sid === undefined || typeof sid.valueOf() !== 'string') {
|
||||
throw new Error('sid cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (sid !== null && sid !== undefined) {
|
||||
if (sid.length > 256)
|
||||
{
|
||||
throw new Error('"sid" should satisfy the constraint - "MaxLength": 256');
|
||||
}
|
||||
if (sid.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"sid" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{sid}', encodeURIComponent(sid));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['SubscriptionKeysContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all subscriptions of the API Management service instance.
|
||||
*
|
||||
|
@ -1695,6 +1896,7 @@ class Subscription {
|
|||
this._deleteMethod = _deleteMethod;
|
||||
this._regeneratePrimaryKey = _regeneratePrimaryKey;
|
||||
this._regenerateSecondaryKey = _regenerateSecondaryKey;
|
||||
this._listSecrets = _listSecrets;
|
||||
this._listNext = _listNext;
|
||||
}
|
||||
|
||||
|
@ -2059,6 +2261,10 @@ class Subscription {
|
|||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
* creating an entity, but required when updating an entity.
|
||||
*
|
||||
* @param {string} [options.appType] Determines the type of application which
|
||||
* send the create user request. Default is legacy publisher portal. Possible
|
||||
* values include: 'portal', 'developerPortal'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
|
@ -2133,6 +2339,10 @@ class Subscription {
|
|||
* @param {string} [options.ifMatch] ETag of the Entity. Not required when
|
||||
* creating an entity, but required when updating an entity.
|
||||
*
|
||||
* @param {string} [options.appType] Determines the type of application which
|
||||
* send the create user request. Default is legacy publisher portal. Possible
|
||||
* values include: 'portal', 'developerPortal'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
|
@ -2218,7 +2428,8 @@ class Subscription {
|
|||
* 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'
|
||||
*
|
||||
* @param {string} [parameters.stateComment] Comments describing subscription
|
||||
* state change by the administrator.
|
||||
* state change by the administrator when the state is changed to the
|
||||
* 'rejected'.
|
||||
*
|
||||
* @param {boolean} [parameters.allowTracing] Determines whether tracing can be
|
||||
* enabled
|
||||
|
@ -2234,6 +2445,10 @@ class Subscription {
|
|||
* subscription
|
||||
* - If true, send email notification of change of state of subscription
|
||||
*
|
||||
* @param {string} [options.appType] Determines the type of application which
|
||||
* send the create user request. Default is legacy publisher portal. Possible
|
||||
* values include: 'portal', 'developerPortal'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
|
@ -2297,7 +2512,8 @@ class Subscription {
|
|||
* 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'
|
||||
*
|
||||
* @param {string} [parameters.stateComment] Comments describing subscription
|
||||
* state change by the administrator.
|
||||
* state change by the administrator when the state is changed to the
|
||||
* 'rejected'.
|
||||
*
|
||||
* @param {boolean} [parameters.allowTracing] Determines whether tracing can be
|
||||
* enabled
|
||||
|
@ -2313,6 +2529,10 @@ class Subscription {
|
|||
* subscription
|
||||
* - If true, send email notification of change of state of subscription
|
||||
*
|
||||
* @param {string} [options.appType] Determines the type of application which
|
||||
* send the create user request. Default is legacy publisher portal. Possible
|
||||
* values include: 'portal', 'developerPortal'
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
|
@ -2642,6 +2862,99 @@ class Subscription {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subscription keys.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} sid Subscription entity Identifier. The entity represents
|
||||
* the association between a user and a product in API Management.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<SubscriptionKeysContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listSecretsWithHttpOperationResponse(resourceGroupName, serviceName, sid, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, sid, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subscription keys.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {string} sid Subscription entity Identifier. The entity represents
|
||||
* the association between a user and a product in API Management.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {SubscriptionKeysContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link SubscriptionKeysContract} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listSecrets(resourceGroupName, serviceName, sid, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, sid, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listSecrets(resourceGroupName, serviceName, sid, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all subscriptions of the API Management service instance.
|
||||
*
|
||||
|
|
|
@ -121,10 +121,6 @@ function _listByOperation(resourceGroupName, serviceName, apiId, operationId, op
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -356,10 +352,6 @@ function _getEntityStateByOperation(resourceGroupName, serviceName, apiId, opera
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -563,10 +555,6 @@ function _getByOperation(resourceGroupName, serviceName, apiId, operationId, tag
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -787,10 +775,6 @@ function _assignToOperation(resourceGroupName, serviceName, apiId, operationId,
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -1027,10 +1011,6 @@ function _detachFromOperation(resourceGroupName, serviceName, apiId, operationId
|
|||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (operationId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"operationId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -2243,10 +2223,6 @@ function _listByProduct(resourceGroupName, serviceName, productId, options, call
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
|
||||
throw new Error('filter must be of type string.');
|
||||
|
@ -2456,10 +2432,6 @@ function _getEntityStateByProduct(resourceGroupName, serviceName, productId, tag
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -2641,10 +2613,6 @@ function _getByProduct(resourceGroupName, serviceName, productId, tagId, options
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -2843,10 +2811,6 @@ function _assignToProduct(resourceGroupName, serviceName, productId, tagId, opti
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
@ -3061,10 +3025,6 @@ function _detachFromProduct(resourceGroupName, serviceName, productId, tagId, op
|
|||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (productId.match(/^[^*#&+:<>?]+$/) === null)
|
||||
{
|
||||
throw new Error('"productId" should satisfy the constraint - "Pattern": /^[^*#&+:<>?]+$/');
|
||||
}
|
||||
}
|
||||
if (tagId === null || tagId === undefined || typeof tagId.valueOf() !== 'string') {
|
||||
throw new Error('tagId cannot be null or undefined and it must be of type string.');
|
||||
|
|
|
@ -159,7 +159,7 @@ function _getEntityTag(resourceGroupName, serviceName, options, callback) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get tenant access information details
|
||||
* Get tenant access information details without secrets.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
|
@ -786,6 +786,169 @@ function _regenerateSecondaryKey(resourceGroupName, serviceName, options, callba
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tenant access information details.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link AccessInformationContract} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listSecrets(resourceGroupName, serviceName, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
let accessName = 'access';
|
||||
// Validate
|
||||
try {
|
||||
if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {
|
||||
throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') {
|
||||
throw new Error('serviceName cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (serviceName !== null && serviceName !== undefined) {
|
||||
if (serviceName.length > 50)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MaxLength": 50');
|
||||
}
|
||||
if (serviceName.length < 1)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "MinLength": 1');
|
||||
}
|
||||
if (serviceName.match(/^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/) === null)
|
||||
{
|
||||
throw new Error('"serviceName" should satisfy the constraint - "Pattern": /^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/');
|
||||
}
|
||||
}
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') {
|
||||
throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets';
|
||||
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
|
||||
requestUrl = requestUrl.replace('{serviceName}', encodeURIComponent(serviceName));
|
||||
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
|
||||
requestUrl = requestUrl.replace('{accessName}', encodeURIComponent(accessName));
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'POST';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
let internalError = null;
|
||||
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
|
||||
error.code = internalError ? internalError.code : parsedErrorResponse.code;
|
||||
error.message = internalError ? internalError.message : parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['ErrorResponse']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['AccessInformationContract']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/** Class representing a TenantAccess. */
|
||||
class TenantAccess {
|
||||
/**
|
||||
|
@ -799,6 +962,7 @@ class TenantAccess {
|
|||
this._update = _update;
|
||||
this._regeneratePrimaryKey = _regeneratePrimaryKey;
|
||||
this._regenerateSecondaryKey = _regenerateSecondaryKey;
|
||||
this._listSecrets = _listSecrets;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -887,7 +1051,7 @@ class TenantAccess {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get tenant access information details
|
||||
* Get tenant access information details without secrets.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
|
@ -919,7 +1083,7 @@ class TenantAccess {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get tenant access information details
|
||||
* Get tenant access information details without secrets.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
|
@ -1248,6 +1412,93 @@ class TenantAccess {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tenant access information details.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<AccessInformationContract>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listSecretsWithHttpOperationResponse(resourceGroupName, serviceName, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tenant access information details.
|
||||
*
|
||||
* @param {string} resourceGroupName The name of the resource group.
|
||||
*
|
||||
* @param {string} serviceName The name of the API Management service.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {AccessInformationContract} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link AccessInformationContract} for more
|
||||
* information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listSecrets(resourceGroupName, serviceName, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listSecrets(resourceGroupName, serviceName, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listSecrets(resourceGroupName, serviceName, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = TenantAccess;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче