Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR] eventgrid/resource-manager #4758

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/services/eventgridManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ npm install azure-arm-eventgrid

### How to use

#### Authentication, client creation, and get eventSubscriptions as an example.
#### Authentication, client creation, and get domains as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const EventGridManagementClient = require("azure-arm-eventgrid");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new EventGridManagementClient(creds, subscriptionId);
const scope = "testscope";
const eventSubscriptionName = "testeventSubscriptionName";
const resourceGroupName = "testresourceGroupName";
const domainName = "testdomainName";

return client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => {
return client.domains.get(resourceGroupName, domainName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default class EventGridManagementClient extends AzureServiceClient {
generateClientRequestId: boolean;

// Operation groups
domains: operations.Domains;
domainTopics: operations.DomainTopics;
eventSubscriptions: operations.EventSubscriptions;
operations: operations.Operations;
topics: operations.Topics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class EventGridManagementClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2019-01-01';
this.apiVersion = '2019-02-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -72,6 +72,8 @@ class EventGridManagementClient extends ServiceClient {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.domains = new operations.Domains(this);
this.domainTopics = new operations.DomainTopics(this);
this.eventSubscriptions = new operations.EventSubscriptions(this);
this.operations = new operations.Operations(this);
this.topics = new operations.Topics(this);
Expand Down
13 changes: 8 additions & 5 deletions lib/services/eventgridManagement/lib/models/advancedFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@
'use strict';

/**
* Represents an advanced filter that can be used to filter events based on
* various event envelope/data fields.
* This is the base type that represents an advanced filter. To configure an
* advanced filter, do not directly instantiate an object of this class.
* Instead, instantiate an object of a derived class such as
* BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter
* etc. depending on the type of the key based on which you want to filter.
*
*/
class AdvancedFilter {
/**
* Create a AdvancedFilter.
* @member {string} [key] The filter key. Represents an event property with
* up to two levels of nesting.
* @member {string} operatorType Polymorphic Discriminator
* @property {string} [key] The field/property in the event based on which
* you want to filter.
* @property {string} operatorType Polymorphic Discriminator
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
const models = require('./index');

/**
* BoolEquals Filter
* BoolEquals Advanced Filter.
*
* @extends models['AdvancedFilter']
*/
class BoolEqualsAdvancedFilter extends models['AdvancedFilter'] {
/**
* Create a BoolEqualsAdvancedFilter.
* @member {boolean} [value] The filter value
* @property {boolean} [value] The boolean filter value.
*/
constructor() {
super();
Expand Down
16 changes: 9 additions & 7 deletions lib/services/eventgridManagement/lib/models/domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ const models = require('./index');
class Domain extends models['TrackedResource'] {
/**
* Create a Domain.
* @member {string} [provisioningState] Provisioning state of the domain.
* @property {string} [provisioningState] Provisioning state of the domain.
* Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
* 'Canceled', 'Failed'
* @member {string} [endpoint] Endpoint for the domain.
* @member {string} [inputSchema] This determines the format that Event Grid
* should expect for incoming events published to the domain. Possible values
* include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema'
* @member {object} [inputSchemaMapping] Information about the
* @property {string} [endpoint] Endpoint for the domain.
* @property {string} [inputSchema] This determines the format that Event
* Grid should expect for incoming events published to the domain. Possible
* values include: 'EventGridSchema', 'CustomEventSchema',
* 'CloudEventV01Schema'. Default value: 'EventGridSchema' .
* @property {object} [inputSchemaMapping] Information about the
* InputSchemaMapping which specified the info about mapping event payload.
* @member {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic
* @property {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic
* Discriminator
*/
constructor() {
Expand Down Expand Up @@ -114,6 +115,7 @@ class Domain extends models['TrackedResource'] {
inputSchema: {
required: false,
serializedName: 'properties.inputSchema',
defaultValue: 'EventGridSchema',
type: {
name: 'String'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class DomainRegenerateKeyRequest {
/**
* Create a DomainRegenerateKeyRequest.
* @member {string} keyName Key name to regenerate key1 or key2
* @property {string} keyName Key name to regenerate key1 or key2
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
class DomainSharedAccessKeys {
/**
* Create a DomainSharedAccessKeys.
* @member {string} [key1] Shared access key1 for the domain.
* @member {string} [key2] Shared access key2 for the domain.
* @property {string} [key1] Shared access key1 for the domain.
* @property {string} [key2] Shared access key2 for the domain.
*/
constructor() {
}
Expand Down
10 changes: 10 additions & 0 deletions lib/services/eventgridManagement/lib/models/domainTopic.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const models = require('./index');
class DomainTopic extends models['Resource'] {
/**
* Create a DomainTopic.
* @property {string} [provisioningState] Provisioning state of the domain
* topic. Possible values include: 'Creating', 'Updating', 'Deleting',
* 'Succeeded', 'Canceled', 'Failed'
*/
constructor() {
super();
Expand Down Expand Up @@ -62,6 +65,13 @@ class DomainTopic extends models['Resource'] {
type: {
name: 'String'
}
},
provisioningState: {
required: false,
serializedName: 'properties.provisioningState',
type: {
name: 'String'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class DomainTopicsListResult extends Array {
/**
* Create a DomainTopicsListResult.
* @property {string} [nextLink] A link for the next page of domain topics
*/
constructor() {
super();
Expand Down Expand Up @@ -49,6 +50,13 @@ class DomainTopicsListResult extends Array {
}
}
}
},
nextLink: {
required: false,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class DomainUpdateParameters {
/**
* Create a DomainUpdateParameters.
* @member {object} [tags] Tags of the domains resource
* @property {object} [tags] Tags of the domains resource
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class DomainsListResult extends Array {
/**
* Create a DomainsListResult.
* @property {string} [nextLink] A link for the next page of domains
*/
constructor() {
super();
Expand Down Expand Up @@ -49,6 +50,13 @@ class DomainsListResult extends Array {
}
}
}
},
nextLink: {
required: false,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
Expand Down
26 changes: 23 additions & 3 deletions lib/services/eventgridManagement/lib/models/eventSubscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ class EventSubscription extends models['Resource'] {
* events for an event subscription based on a resource path suffix.
* Wildcard characters are not supported in this path.
* @property {array} [filter.includedEventTypes] A list of applicable event
* types that need to be part of the event subscription.
* If it is desired to subscribe to all event types, the string "all" needs
* to be specified as an element in this list.
* types that need to be part of the event subscription. If it is desired to
* subscribe to all default event types, set the IncludedEventTypes to null.
* @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the
* SubjectBeginsWith and SubjectEndsWith properties of the filter
* should be compared in a case sensitive manner.
* @property {array} [filter.advancedFilters] An array of advanced filters
* that are used for filtering event subscriptions.
* @property {array} [labels] List of user defined labels.
* @property {date} [expirationTimeUtc] Expiration time of the event
* subscription.
* @property {string} [eventDeliverySchema] The event delivery schema for the
* event subscription. Possible values include: 'EventGridSchema',
* 'CloudEventV01Schema', 'CustomInputSchema'
* @property {object} [retryPolicy] The retry policy for events. This can be
* used to configure maximum number of delivery attempts and time to live for
* events.
Expand Down Expand Up @@ -149,6 +155,20 @@ class EventSubscription extends models['Resource'] {
}
}
},
expirationTimeUtc: {
required: false,
serializedName: 'properties.expirationTimeUtc',
type: {
name: 'DateTime'
}
},
eventDeliverySchema: {
required: false,
serializedName: 'properties.eventDeliverySchema',
type: {
name: 'String'
}
},
retryPolicy: {
required: false,
serializedName: 'properties.retryPolicy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ class EventSubscriptionFilter {
* for an event subscription based on a resource path suffix.
* Wildcard characters are not supported in this path.
* @property {array} [includedEventTypes] A list of applicable event types
* that need to be part of the event subscription.
* If it is desired to subscribe to all event types, the string "all" needs
* to be specified as an element in this list.
* that need to be part of the event subscription. If it is desired to
* subscribe to all default event types, set the IncludedEventTypes to null.
* @property {boolean} [isSubjectCaseSensitive] Specifies if the
* SubjectBeginsWith and SubjectEndsWith properties of the filter
* should be compared in a case sensitive manner. Default value: false .
* @property {array} [advancedFilters] An array of advanced filters that are
* used for filtering event subscriptions.
*/
constructor() {
}
Expand Down Expand Up @@ -84,6 +85,26 @@ class EventSubscriptionFilter {
type: {
name: 'Boolean'
}
},
advancedFilters: {
required: false,
serializedName: 'advancedFilters',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AdvancedFilterElementType',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'operatorType',
clientName: 'operatorType'
},
uberParent: 'AdvancedFilter',
className: 'AdvancedFilter'
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ class EventSubscriptionUpdateParameters {
* events for an event subscription based on a resource path suffix.
* Wildcard characters are not supported in this path.
* @property {array} [filter.includedEventTypes] A list of applicable event
* types that need to be part of the event subscription.
* If it is desired to subscribe to all event types, the string "all" needs
* to be specified as an element in this list.
* types that need to be part of the event subscription. If it is desired to
* subscribe to all default event types, set the IncludedEventTypes to null.
* @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the
* SubjectBeginsWith and SubjectEndsWith properties of the filter
* should be compared in a case sensitive manner.
* @property {array} [filter.advancedFilters] An array of advanced filters
* that are used for filtering event subscriptions.
* @property {array} [labels] List of user defined labels.
* @property {date} [expirationTimeUtc] Information about the expiration time
* for the event subscription.
* @property {string} [eventDeliverySchema] The event delivery schema for the
* event subscription. Possible values include: 'EventGridSchema',
* 'CloudEventV01Schema', 'CustomInputSchema'
* @property {object} [retryPolicy] The retry policy for events. This can be
* used to configure maximum number of delivery attempts and time to live for
* events.
Expand Down Expand Up @@ -101,6 +107,20 @@ class EventSubscriptionUpdateParameters {
}
}
},
expirationTimeUtc: {
required: false,
serializedName: 'expirationTimeUtc',
type: {
name: 'DateTime'
}
},
eventDeliverySchema: {
required: false,
serializedName: 'eventDeliverySchema',
type: {
name: 'String'
}
},
retryPolicy: {
required: false,
serializedName: 'retryPolicy',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
class EventSubscriptionsListResult extends Array {
/**
* Create a EventSubscriptionsListResult.
* @property {string} [nextLink] A link for the next page of event
* subscriptions
*/
constructor() {
super();
Expand Down Expand Up @@ -49,6 +51,13 @@ class EventSubscriptionsListResult extends Array {
}
}
}
},
nextLink: {
required: false,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions lib/services/eventgridManagement/lib/models/eventType.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class EventType extends models['Resource'] {
* @property {string} [displayName] Display name of the event type.
* @property {string} [description] Description of the event type.
* @property {string} [schemaUrl] Url of the schema for this event type.
* @property {boolean} [isInDefaultSet] IsInDefaultSet flag of the event
* type.
*/
constructor() {
super();
Expand Down Expand Up @@ -86,6 +88,13 @@ class EventType extends models['Resource'] {
type: {
name: 'String'
}
},
isInDefaultSet: {
required: false,
serializedName: 'properties.isInDefaultSet',
type: {
name: 'Boolean'
}
}
}
}
Expand Down
Loading