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

Commit

Permalink
Merge pull request #4286 from Azure/restapi_auto_eventgrid/resource-m…
Browse files Browse the repository at this point in the history
…anager

[AutoPR] eventgrid/resource-manager
  • Loading branch information
kpajdzik authored Jan 9, 2019
2 parents 904d137 + 549668e commit 4aa80f4
Show file tree
Hide file tree
Showing 36 changed files with 331 additions and 2,519 deletions.
2 changes: 1 addition & 1 deletion lib/services/eventgridManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 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
Expand Down
33 changes: 18 additions & 15 deletions lib/services/eventgridManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,43 @@ uid: azure-arm-eventgrid
summary: *content

---
# Microsoft Azure SDK for Node.js - EventGridManagementClient
**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 - EventGridManagementClient

This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features
### Features


## How to Install
### How to Install

```bash
npm install azure-arm-eventgrid
```

## How to use
### How to use

### Authentication, client creation and get domains as an example.
#### Authentication, client creation, and get eventSubscriptions 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 resourceGroupName = "testresourceGroupName";
const domainName = "testdomainName";
return client.domains.get(resourceGroupName, domainName).then((result) => {
console.log("The result is:");
console.log(result);
});
const subscriptionId = "<Subscription_Id>";
const client = new EventGridManagementClient(creds, subscriptionId);
const scope = "testscope";
const eventSubscriptionName = "testeventSubscriptionName";

return client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});

## Related projects
```
### Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ 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 = '2018-09-15-preview';
this.apiVersion = '2019-01-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -72,8 +72,6 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AdvancedFilter {
/**
* Create a AdvancedFilter.
* @member {string} [key] The filter key. Represents an event property with
* upto two levels of nesting.
* up to two levels of nesting.
* @member {string} operatorType Polymorphic Discriminator
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class DeadLetterDestination {
/**
* Create a DeadLetterDestination.
* @member {string} endpointType Polymorphic Discriminator
* @property {string} endpointType Polymorphic Discriminator
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const models = require('./index');
class EventHubEventSubscriptionDestination extends models['EventSubscriptionDestination'] {
/**
* Create a EventHubEventSubscriptionDestination.
* @member {string} [resourceId] The Azure Resource Id that represents the
* @property {string} [resourceId] The Azure Resource Id that represents the
* endpoint of an Event Hub destination of an event subscription.
*/
constructor() {
Expand Down
52 changes: 16 additions & 36 deletions lib/services/eventgridManagement/lib/models/eventSubscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,40 @@ const models = require('./index');
class EventSubscription extends models['Resource'] {
/**
* Create a EventSubscription.
* @member {string} [topic] Name of the topic of the event subscription.
* @member {string} [provisioningState] Provisioning state of the event
* @property {string} [topic] Name of the topic of the event subscription.
* @property {string} [provisioningState] Provisioning state of the event
* subscription. Possible values include: 'Creating', 'Updating', 'Deleting',
* 'Succeeded', 'Canceled', 'Failed', 'AwaitingManualAction'
* @member {object} [destination] Information about the destination where
* @property {object} [destination] Information about the destination where
* events have to be delivered for the event subscription.
* @member {string} [destination.endpointType] Polymorphic Discriminator
* @member {object} [filter] Information about the filter for the event
* @property {string} [destination.endpointType] Polymorphic Discriminator
* @property {object} [filter] Information about the filter for the event
* subscription.
* @member {string} [filter.subjectBeginsWith] An optional string to filter
* @property {string} [filter.subjectBeginsWith] An optional string to filter
* events for an event subscription based on a resource path prefix.
* The format of this depends on the publisher of the events.
* Wildcard characters are not supported in this path.
* @member {string} [filter.subjectEndsWith] An optional string to filter
* @property {string} [filter.subjectEndsWith] An optional string to filter
* events for an event subscription based on a resource path suffix.
* Wildcard characters are not supported in this path.
* @member {array} [filter.includedEventTypes] A list of applicable event
* @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.
* @member {boolean} [filter.isSubjectCaseSensitive] Specifies if the
* @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the
* SubjectBeginsWith and SubjectEndsWith properties of the filter
* should be compared in a case sensitive manner.
* @member {array} [filter.advancedFilters] A list of advanced filters.
* @member {array} [labels] List of user defined labels.
* @member {date} [expirationTimeUtc] Expiration time of the event
* subscription.
* @member {string} [eventDeliverySchema] The event delivery schema for the
* event subscription. Possible values include: 'EventGridSchema',
* 'CloudEventV01Schema', 'CustomInputSchema'
* @member {object} [retryPolicy] The retry policy for events. This can be
* @property {array} [labels] List of user defined labels.
* @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.
* @member {number} [retryPolicy.maxDeliveryAttempts] Maximum number of
* @property {number} [retryPolicy.maxDeliveryAttempts] Maximum number of
* delivery retry attempts for events.
* @member {number} [retryPolicy.eventTimeToLiveInMinutes] Time To Live (in
* @property {number} [retryPolicy.eventTimeToLiveInMinutes] Time To Live (in
* minutes) for events.
* @member {object} [deadLetterDestination] The DeadLetter destination of the
* event subscription.
* @member {string} [deadLetterDestination.endpointType] Polymorphic
* @property {object} [deadLetterDestination] The DeadLetter destination of
* the event subscription.
* @property {string} [deadLetterDestination.endpointType] Polymorphic
* Discriminator
*/
constructor() {
Expand Down Expand Up @@ -155,20 +149,6 @@ 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 @@ -17,7 +17,7 @@
class EventSubscriptionDestination {
/**
* Create a EventSubscriptionDestination.
* @member {string} endpointType Polymorphic Discriminator
* @property {string} endpointType Polymorphic Discriminator
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
class EventSubscriptionFilter {
/**
* Create a EventSubscriptionFilter.
* @member {string} [subjectBeginsWith] An optional string to filter events
* @property {string} [subjectBeginsWith] An optional string to filter events
* for an event subscription based on a resource path prefix.
* The format of this depends on the publisher of the events.
* Wildcard characters are not supported in this path.
* @member {string} [subjectEndsWith] An optional string to filter events for
* an event subscription based on a resource path suffix.
* @property {string} [subjectEndsWith] An optional string to filter events
* for an event subscription based on a resource path suffix.
* Wildcard characters are not supported in this path.
* @member {array} [includedEventTypes] A list of applicable event types that
* need to be part of the event subscription.
* @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.
* @member {boolean} [isSubjectCaseSensitive] Specifies if the
* @property {boolean} [isSubjectCaseSensitive] Specifies if the
* SubjectBeginsWith and SubjectEndsWith properties of the filter
* should be compared in a case sensitive manner. Default value: false .
* @member {array} [advancedFilters] A list of advanced filters.
*/
constructor() {
}
Expand Down Expand Up @@ -85,26 +84,6 @@ 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 @@ -17,8 +17,8 @@
class EventSubscriptionFullUrl {
/**
* Create a EventSubscriptionFullUrl.
* @member {string} [endpointUrl] The URL that represents the endpoint of the
* destination of an event subscription.
* @property {string} [endpointUrl] The URL that represents the endpoint of
* the destination of an event subscription.
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,36 @@
class EventSubscriptionUpdateParameters {
/**
* Create a EventSubscriptionUpdateParameters.
* @member {object} [destination] Information about the destination where
* @property {object} [destination] Information about the destination where
* events have to be delivered for the event subscription.
* @member {string} [destination.endpointType] Polymorphic Discriminator
* @member {object} [filter] Information about the filter for the event
* @property {string} [destination.endpointType] Polymorphic Discriminator
* @property {object} [filter] Information about the filter for the event
* subscription.
* @member {string} [filter.subjectBeginsWith] An optional string to filter
* @property {string} [filter.subjectBeginsWith] An optional string to filter
* events for an event subscription based on a resource path prefix.
* The format of this depends on the publisher of the events.
* Wildcard characters are not supported in this path.
* @member {string} [filter.subjectEndsWith] An optional string to filter
* @property {string} [filter.subjectEndsWith] An optional string to filter
* events for an event subscription based on a resource path suffix.
* Wildcard characters are not supported in this path.
* @member {array} [filter.includedEventTypes] A list of applicable event
* @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.
* @member {boolean} [filter.isSubjectCaseSensitive] Specifies if the
* @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the
* SubjectBeginsWith and SubjectEndsWith properties of the filter
* should be compared in a case sensitive manner.
* @member {array} [filter.advancedFilters] A list of advanced filters.
* @member {array} [labels] List of user defined labels.
* @member {date} [expirationTimeUtc] Information about the expiration time
* for the event subscription.
* @member {string} [eventDeliverySchema] The event delivery schema for the
* event subscription. Possible values include: 'EventGridSchema',
* 'CloudEventV01Schema', 'CustomInputSchema'
* @member {object} [retryPolicy] The retry policy for events. This can be
* @property {array} [labels] List of user defined labels.
* @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.
* @member {number} [retryPolicy.maxDeliveryAttempts] Maximum number of
* @property {number} [retryPolicy.maxDeliveryAttempts] Maximum number of
* delivery retry attempts for events.
* @member {number} [retryPolicy.eventTimeToLiveInMinutes] Time To Live (in
* @property {number} [retryPolicy.eventTimeToLiveInMinutes] Time To Live (in
* minutes) for events.
* @member {object} [deadLetterDestination] The DeadLetter destination of the
* event subscription.
* @member {string} [deadLetterDestination.endpointType] Polymorphic
* @property {object} [deadLetterDestination] The DeadLetter destination of
* the event subscription.
* @property {string} [deadLetterDestination.endpointType] Polymorphic
* Discriminator
*/
constructor() {
Expand Down Expand Up @@ -107,20 +101,6 @@ 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
6 changes: 3 additions & 3 deletions lib/services/eventgridManagement/lib/models/eventType.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const models = require('./index');
class EventType extends models['Resource'] {
/**
* Create a EventType.
* @member {string} [displayName] Display name of the event type.
* @member {string} [description] Description of the event type.
* @member {string} [schemaUrl] Url of the schema for this event type.
* @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.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const models = require('./index');
class HybridConnectionEventSubscriptionDestination extends models['EventSubscriptionDestination'] {
/**
* Create a HybridConnectionEventSubscriptionDestination.
* @member {string} [resourceId] The Azure Resource ID of an hybrid
* @property {string} [resourceId] The Azure Resource ID of an hybrid
* connection that is the destination of an event subscription.
*/
constructor() {
Expand Down
Loading

0 comments on commit 4aa80f4

Please sign in to comment.