Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR securityinsights/resource-manager] Adding support for actions of alertRules #1149

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
19 changes: 19 additions & 0 deletions packages/@azure/arm-securityinsight/lib/models/actionsMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* 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.
*/

export {
discriminators,
ActionsList,
Action,
Resource,
BaseResource,
CloudError
} from "../models/mappers";

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export {
AlertRulesList,
AlertRule,
CloudError,
Action,
Resource,
BaseResource,
ScheduledAlertRule
} from "../models/mappers";

210 changes: 182 additions & 28 deletions packages/@azure/arm-securityinsight/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,58 @@ export interface ScheduledAlertRule {
readonly lastModifiedUtc?: string;
}

/**
* @interface
* An interface representing Resource.
* An azure resource object
*
* @extends BaseResource
*/
export interface Resource extends BaseResource {
/**
* @member {string} [id] Azure resource Id
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly id?: string;
/**
* @member {string} [type] Azure resource type
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly type?: string;
/**
* @member {string} [name] Azure resource name
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly name?: string;
}

/**
* @interface
* An interface representing Action.
* Action for alert rule.
*
* @extends Resource
*/
export interface Action extends Resource {
/**
* @member {string} [etag] Etag of the action.
*/
etag?: string;
/**
* @member {string} [triggerUri] The uri for the action to trigger.
*/
triggerUri?: string;
/**
* @member {string} [ruleId] The unique identifier of the rule.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly ruleId?: string;
}

/**
* Contains the possible cases for DataConnector.
*/
Expand Down Expand Up @@ -649,34 +701,6 @@ export interface AlertsDataTypeOfDataConnector {
alerts?: AlertsDataTypeOfDataConnectorAlerts;
}

/**
* @interface
* An interface representing Resource.
* An azure resource object
*
* @extends BaseResource
*/
export interface Resource extends BaseResource {
/**
* @member {string} [id] Azure resource Id
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly id?: string;
/**
* @member {string} [type] Azure resource type
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly type?: string;
/**
* @member {string} [name] Azure resource name
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly name?: string;
}

/**
* @interface
* An interface representing SecurityInsightsOptions.
Expand Down Expand Up @@ -720,6 +744,22 @@ export interface AlertRulesList extends Array<AlertRuleUnion> {
readonly nextLink?: string;
}

/**
* @interface
* An interface representing the ActionsList.
* List all the actions.
*
* @extends Array<Action>
*/
export interface ActionsList extends Array<Action> {
/**
* @member {string} [nextLink] URL to fetch the next set of actions.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly nextLink?: string;
}

/**
* @interface
* An interface representing the DataConnectorList.
Expand Down Expand Up @@ -872,6 +912,44 @@ export type AlertRulesCreateResponse = AlertRuleUnion & {
};
};

/**
* Contains response data for the getAction operation.
*/
export type AlertRulesGetActionResponse = Action & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: Action;
};
};

/**
* Contains response data for the createAction operation.
*/
export type AlertRulesCreateActionResponse = Action & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: Action;
};
};

/**
* Contains response data for the listNext operation.
*/
Expand All @@ -891,6 +969,82 @@ export type AlertRulesListNextResponse = AlertRulesList & {
};
};

/**
* Contains response data for the listByAlertRule operation.
*/
export type ActionsListByAlertRuleResponse = ActionsList & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ActionsList;
};
};

/**
* Contains response data for the list operation.
*/
export type ActionsListResponse = ActionsList & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ActionsList;
};
};

/**
* Contains response data for the listByAlertRuleNext operation.
*/
export type ActionsListByAlertRuleNextResponse = ActionsList & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ActionsList;
};
};

/**
* Contains response data for the listNext operation.
*/
export type ActionsListNextResponse = ActionsList & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ActionsList;
};
};

/**
* Contains response data for the list operation.
*/
Expand Down
Loading