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

[AutoPR eventgrid/resource-manager] EventGrid: Updated README.MD configuration to include the new preview API version. #3534

Merged
merged 2 commits into from
Sep 12, 2018
Merged
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 @@ -18,17 +18,17 @@ 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";
return client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => {
const resourceGroupName = "testresourceGroupName";
const domainName = "testdomainName";
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 = '2018-05-01-preview';
this.apiVersion = '2018-09-15-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
68 changes: 68 additions & 0 deletions lib/services/eventgridManagement/lib/models/advancedFilter.js
Original file line number Diff line number Diff line change
@@ -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';

/**
* Represents an advanced filter that can be used to filter events based on
* various event envelope/data fields.
*
*/
class AdvancedFilter {
/**
* Create a AdvancedFilter.
* @member {string} [key] The filter key. Represents an event property with
* upto two levels of nesting.
* @member {string} operatorType Polymorphic Discriminator
*/
constructor() {
}

/**
* Defines the metadata of AdvancedFilter
*
* @returns {object} metadata of AdvancedFilter
*
*/
mapper() {
return {
required: false,
serializedName: 'AdvancedFilter',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'operatorType',
clientName: 'operatorType'
},
uberParent: 'AdvancedFilter',
className: 'AdvancedFilter',
modelProperties: {
key: {
required: false,
serializedName: 'key',
type: {
name: 'String'
}
},
operatorType: {
required: true,
serializedName: 'operatorType',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AdvancedFilter;
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* 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');

/**
* BoolEquals Filter
*
* @extends models['AdvancedFilter']
*/
class BoolEqualsAdvancedFilter extends models['AdvancedFilter'] {
/**
* Create a BoolEqualsAdvancedFilter.
* @member {boolean} [value] The filter value
*/
constructor() {
super();
}

/**
* Defines the metadata of BoolEqualsAdvancedFilter
*
* @returns {object} metadata of BoolEqualsAdvancedFilter
*
*/
mapper() {
return {
required: false,
serializedName: 'BoolEquals',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'operatorType',
clientName: 'operatorType'
},
uberParent: 'AdvancedFilter',
className: 'BoolEqualsAdvancedFilter',
modelProperties: {
key: {
required: false,
serializedName: 'key',
type: {
name: 'String'
}
},
operatorType: {
required: true,
serializedName: 'operatorType',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
value: {
required: false,
serializedName: 'value',
type: {
name: 'Boolean'
}
}
}
}
};
}
}

module.exports = BoolEqualsAdvancedFilter;
140 changes: 140 additions & 0 deletions lib/services/eventgridManagement/lib/models/domain.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/*
* 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');

/**
* EventGrid Domain
*
* @extends models['TrackedResource']
*/
class Domain extends models['TrackedResource'] {
/**
* Create a Domain.
* @member {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
* InputSchemaMapping which specified the info about mapping event payload.
* @member {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic
* Discriminator
*/
constructor() {
super();
}

/**
* Defines the metadata of Domain
*
* @returns {object} metadata of Domain
*
*/
mapper() {
return {
required: false,
serializedName: 'Domain',
type: {
name: 'Composite',
className: 'Domain',
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'
}
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
provisioningState: {
required: false,
readOnly: true,
serializedName: 'properties.provisioningState',
type: {
name: 'String'
}
},
endpoint: {
required: false,
readOnly: true,
serializedName: 'properties.endpoint',
type: {
name: 'String'
}
},
inputSchema: {
required: false,
serializedName: 'properties.inputSchema',
type: {
name: 'String'
}
},
inputSchemaMapping: {
required: false,
serializedName: 'properties.inputSchemaMapping',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'inputSchemaMappingType',
clientName: 'inputSchemaMappingType'
},
uberParent: 'InputSchemaMapping',
className: 'InputSchemaMapping'
}
}
}
}
};
}
}

module.exports = Domain;
Original file line number Diff line number Diff line change
@@ -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';

/**
* Domain regenerate share access key request
*
*/
class DomainRegenerateKeyRequest {
/**
* Create a DomainRegenerateKeyRequest.
* @member {string} keyName Key name to regenerate key1 or key2
*/
constructor() {
}

/**
* Defines the metadata of DomainRegenerateKeyRequest
*
* @returns {object} metadata of DomainRegenerateKeyRequest
*
*/
mapper() {
return {
required: false,
serializedName: 'DomainRegenerateKeyRequest',
type: {
name: 'Composite',
className: 'DomainRegenerateKeyRequest',
modelProperties: {
keyName: {
required: true,
serializedName: 'keyName',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = DomainRegenerateKeyRequest;
Loading