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

[AutoPR automation/resource-manager] Watcher resource swagger specs. For more details on the Usage of the resource: https://docs.microsoft.com/en-us/azure/automation/automation-watchers-tutorial #2878

Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default class AutomationClient extends AzureServiceClient {
dscCompilationJobOperations: operations.DscCompilationJobOperations;
dscCompilationJobStream: operations.DscCompilationJobStream;
dscNodeConfigurationOperations: operations.DscNodeConfigurationOperations;
watcherOperations: operations.WatcherOperations;
}

export { AutomationClient, models as AutomationModels };
1 change: 1 addition & 0 deletions lib/services/automationManagement/lib/automationClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class AutomationClient extends ServiceClient {
this.dscCompilationJobOperations = new operations.DscCompilationJobOperations(this);
this.dscCompilationJobStream = new operations.DscCompilationJobStream(this);
this.dscNodeConfigurationOperations = new operations.DscNodeConfigurationOperations(this);
this.watcherOperations = new operations.WatcherOperations(this);
this.models = models;
msRest.addSerializationMixin(this);
}
Expand Down
148 changes: 134 additions & 14 deletions lib/services/automationManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,55 @@ export interface Certificate extends ProxyResource {
description?: string;
}

/**
* @class
* Initializes a new instance of the TrackedResource class.
* @constructor
* The resource model definition for a ARM tracked top level resource
*
* @member {object} [tags] Resource tags.
* @member {string} [location] The Azure Region where the resource lives
*/
export interface TrackedResource extends Resource {
tags?: { [propertyName: string]: string };
location?: string;
}

/**
* @class
* Initializes a new instance of the Watcher class.
* @constructor
* Definition of the watcher type.
*
* @member {number} [executionFrequencyInSeconds] Gets or sets the frequency at
* which the watcher is invoked.
* @member {string} [scriptName] Gets or sets the name of the script the
* watcher is attached to, i.e. the name of an existing runbook.
* @member {object} [scriptParameters] Gets or sets the parameters of the
* script.
* @member {string} [scriptRunOn] Gets or sets the name of the hybrid worker
* group the watcher will run on.
* @member {string} [status] Gets the current status of the watcher.
* @member {date} [creationTime] Gets or sets the creation time.
* @member {date} [lastModifiedTime] Gets or sets the last modified time.
* @member {string} [lastModifiedBy] Details of the user who last modified the
* watcher.
* @member {string} [description] Gets or sets the description.
* @member {string} [etag] Gets or sets the etag of the resource.
*/
export interface Watcher extends TrackedResource {
executionFrequencyInSeconds?: number;
scriptName?: string;
scriptParameters?: { [propertyName: string]: string };
scriptRunOn?: string;
readonly status?: string;
readonly creationTime?: Date;
readonly lastModifiedTime?: Date;
readonly lastModifiedBy?: string;
description?: string;
etag?: string;
}

/**
* @class
* Initializes a new instance of the RunbookParameter class.
Expand Down Expand Up @@ -446,20 +495,6 @@ export interface RunbookDraft {
outputTypes?: string[];
}

/**
* @class
* Initializes a new instance of the TrackedResource class.
* @constructor
* The resource model definition for a ARM tracked top level resource
*
* @member {object} [tags] Resource tags.
* @member {string} [location] The Azure Region where the resource lives
*/
export interface TrackedResource extends Resource {
tags?: { [propertyName: string]: string };
location?: string;
}

/**
* @class
* Initializes a new instance of the Runbook class.
Expand Down Expand Up @@ -2356,6 +2391,19 @@ export interface WebhookUpdateParameters {
description?: string;
}

/**
* @class
* Initializes a new instance of the WatcherUpdateParameters class.
* @constructor
* @member {number} [executionFrequencyInSeconds] Gets or sets the frequency at
* which the watcher is invoked.
* @member {string} [name] Gets or sets the name of the resource.
*/
export interface WatcherUpdateParameters {
executionFrequencyInSeconds?: number;
name?: string;
}

/**
* @class
* Initializes a new instance of the JobCollectionItem class.
Expand Down Expand Up @@ -3004,6 +3052,66 @@ export interface SourceControlSyncJobById {
exception?: string;
}

/**
* @class
* Initializes a new instance of the SourceControlSyncJobStream class.
* @constructor
* Definition of the source control sync job stream.
*
* @member {string} [id] Resource id.
* @member {string} [syncJobStreamId] Gets the sync job stream id.
* @member {string} [summary] Gets the summary of the sync job stream.
* @member {date} [time] Gets the time of the sync job stream.
* @member {string} [streamType] Gets the type of the sync job stream. Possible
* values include: 'Error', 'Output'
*/
export interface SourceControlSyncJobStream {
readonly id?: string;
syncJobStreamId?: string;
summary?: string;
readonly time?: Date;
streamType?: string;
}

/**
* @class
* Initializes a new instance of the SourceControlSyncJobStreamsListBySyncJob class.
* @constructor
* The response model for the list source control sync job streams operation.
*
* @member {array} [value] Gets a list of source control sync job streams.
* @member {string} [nextLink] Gets or sets the next link.
*/
export interface SourceControlSyncJobStreamsListBySyncJob {
value?: SourceControlSyncJobStream[];
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the SourceControlSyncJobStreamById class.
* @constructor
* Definition of the source control sync job stream by id.
*
* @member {string} [id] Resource id.
* @member {string} [syncJobStreamId] Gets the sync job stream id.
* @member {string} [summary] Gets the summary of the sync job stream.
* @member {date} [time] Gets the time of the sync job stream.
* @member {string} [streamType] Gets the type of the sync job stream. Possible
* values include: 'Error', 'Output'
* @member {string} [streamText] Gets the text of the sync job stream.
* @member {string} [value] Gets the value of the sync job stream.
*/
export interface SourceControlSyncJobStreamById {
readonly id?: string;
syncJobStreamId?: string;
summary?: string;
readonly time?: Date;
streamType?: string;
streamText?: string;
value?: string;
}

/**
* @class
* Initializes a new instance of the DscNode class.
Expand Down Expand Up @@ -3381,3 +3489,15 @@ export interface DscCompilationJobListResult extends Array<DscCompilationJob> {
export interface DscNodeConfigurationListResult extends Array<DscNodeConfiguration> {
nextLink?: string;
}

/**
* @class
* Initializes a new instance of the WatcherListResult class.
* @constructor
* The response model for the list watcher operation.
*
* @member {string} [nextLink] Gets or sets the next link.
*/
export interface WatcherListResult extends Array<Watcher> {
nextLink?: string;
}
8 changes: 7 additions & 1 deletion lib/services/automationManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ exports.Credential = require('./credential');
exports.ConnectionTypeAssociationProperty = require('./connectionTypeAssociationProperty');
exports.Connection = require('./connection');
exports.Certificate = require('./certificate');
exports.TrackedResource = require('./trackedResource');
exports.Watcher = require('./watcher');
exports.RunbookParameter = require('./runbookParameter');
exports.ContentHash = require('./contentHash');
exports.ContentLink = require('./contentLink');
exports.RunbookDraft = require('./runbookDraft');
exports.TrackedResource = require('./trackedResource');
exports.Runbook = require('./runbook');
exports.ModuleErrorInfo = require('./moduleErrorInfo');
exports.Module = require('./module');
Expand Down Expand Up @@ -114,6 +115,7 @@ exports.VariableCreateOrUpdateParameters = require('./variableCreateOrUpdatePara
exports.VariableUpdateParameters = require('./variableUpdateParameters');
exports.WebhookCreateOrUpdateParameters = require('./webhookCreateOrUpdateParameters');
exports.WebhookUpdateParameters = require('./webhookUpdateParameters');
exports.WatcherUpdateParameters = require('./watcherUpdateParameters');
exports.JobCollectionItem = require('./jobCollectionItem');
exports.WindowsProperties = require('./windowsProperties');
exports.LinuxProperties = require('./linuxProperties');
Expand All @@ -134,6 +136,9 @@ exports.SourceControlUpdateParameters = require('./sourceControlUpdateParameters
exports.SourceControlSyncJob = require('./sourceControlSyncJob');
exports.SourceControlSyncJobCreateParameters = require('./sourceControlSyncJobCreateParameters');
exports.SourceControlSyncJobById = require('./sourceControlSyncJobById');
exports.SourceControlSyncJobStream = require('./sourceControlSyncJobStream');
exports.SourceControlSyncJobStreamsListBySyncJob = require('./sourceControlSyncJobStreamsListBySyncJob');
exports.SourceControlSyncJobStreamById = require('./sourceControlSyncJobStreamById');
exports.DscNode = require('./dscNode');
exports.DscNodeConfiguration = require('./dscNodeConfiguration');
exports.AutomationAccountListResult = require('./automationAccountListResult');
Expand Down Expand Up @@ -163,3 +168,4 @@ exports.DscNodeListResult = require('./dscNodeListResult');
exports.DscNodeReportListResult = require('./dscNodeReportListResult');
exports.DscCompilationJobListResult = require('./dscCompilationJobListResult');
exports.DscNodeConfigurationListResult = require('./dscNodeConfigurationListResult');
exports.WatcherListResult = require('./watcherListResult');
Original file line number Diff line number Diff line change
@@ -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';

/**
* Definition of the source control sync job stream.
*
*/
class SourceControlSyncJobStream {
/**
* Create a SourceControlSyncJobStream.
* @member {string} [id] Resource id.
* @member {string} [syncJobStreamId] Gets the sync job stream id.
* @member {string} [summary] Gets the summary of the sync job stream.
* @member {date} [time] Gets the time of the sync job stream.
* @member {string} [streamType] Gets the type of the sync job stream.
* Possible values include: 'Error', 'Output'
*/
constructor() {
}

/**
* Defines the metadata of SourceControlSyncJobStream
*
* @returns {object} metadata of SourceControlSyncJobStream
*
*/
mapper() {
return {
required: false,
serializedName: 'SourceControlSyncJobStream',
type: {
name: 'Composite',
className: 'SourceControlSyncJobStream',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
syncJobStreamId: {
required: false,
serializedName: 'properties.syncJobStreamId',
type: {
name: 'String'
}
},
summary: {
required: false,
serializedName: 'properties.summary',
type: {
name: 'String'
}
},
time: {
required: false,
readOnly: true,
serializedName: 'properties.time',
type: {
name: 'DateTime'
}
},
streamType: {
required: false,
serializedName: 'properties.streamType',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = SourceControlSyncJobStream;
Loading