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

[AutoPR policyinsights/resource-manager] [Hub Generated] Review request for Microsoft.PolicyInsights to add version 2018-07-01-preview #4624

Merged
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
2 changes: 1 addition & 1 deletion lib/services/policyinsightsManagement/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
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* 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';

/**
* Evaluation details of policy language expressions.
*
*/
class ExpressionEvaluationDetails {
/**
* Create a ExpressionEvaluationDetails.
* @property {string} [result] Evaluation result.
* @property {string} [expression] Expression evaluated.
* @property {string} [path] Property path if the expression is a field or an
* aliase.
* @property {string} [expressionValue] Value of the expression.
* @property {string} [targetValue] Target value to be compared with the
* expression value.
* @property {string} [operator] Operator to compare the expression value and
* the target value.
*/
constructor() {
}

/**
* Defines the metadata of ExpressionEvaluationDetails
*
* @returns {object} metadata of ExpressionEvaluationDetails
*
*/
mapper() {
return {
required: false,
serializedName: 'ExpressionEvaluationDetails',
type: {
name: 'Composite',
className: 'ExpressionEvaluationDetails',
modelProperties: {
result: {
required: false,
serializedName: 'result',
type: {
name: 'String'
}
},
expression: {
required: false,
serializedName: 'expression',
type: {
name: 'String'
}
},
path: {
required: false,
serializedName: 'path',
type: {
name: 'String'
}
},
expressionValue: {
required: false,
serializedName: 'expressionValue',
type: {
name: 'String'
}
},
targetValue: {
required: false,
serializedName: 'targetValue',
type: {
name: 'String'
}
},
operator: {
required: false,
serializedName: 'operator',
type: {
name: 'String'
}
}
}
}
};
}
}

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

/**
* Evaluation details of IfNotExists effect.
*
*/
class IfNotExistsEvaluationDetails {
/**
* Create a IfNotExistsEvaluationDetails.
* @property {string} [resourceId] ID of the last evaluated resource for
* IfNotExists effect.
* @property {number} [totalResources] Total number of resources to which the
* existence condition is applicable.
*/
constructor() {
}

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

module.exports = IfNotExistsEvaluationDetails;
71 changes: 71 additions & 0 deletions lib/services/policyinsightsManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,64 @@ export interface PolicyEventsQueryResults {
value?: PolicyEvent[];
}

/**
* Evaluation details of policy language expressions.
*/
export interface ExpressionEvaluationDetails {
/**
* Evaluation result.
*/
result?: string;
/**
* Expression evaluated.
*/
expression?: string;
/**
* Property path if the expression is a field or an aliase.
*/
path?: string;
/**
* Value of the expression.
*/
expressionValue?: string;
/**
* Target value to be compared with the expression value.
*/
targetValue?: string;
/**
* Operator to compare the expression value and the target value.
*/
operator?: string;
}

/**
* Evaluation details of IfNotExists effect.
*/
export interface IfNotExistsEvaluationDetails {
/**
* ID of the last evaluated resource for IfNotExists effect.
*/
resourceId?: string;
/**
* Total number of resources to which the existence condition is applicable.
*/
totalResources?: number;
}

/**
* Policy evaluation details.
*/
export interface PolicyEvaluationDetails {
/**
* Details of the evaluated expressions.
*/
evaluatedExpressions?: ExpressionEvaluationDetails[];
/**
* Evaluation details of IfNotExists effect.
*/
ifNotExistsDetails?: IfNotExistsEvaluationDetails;
}

/**
* Policy state record.
*/
Expand Down Expand Up @@ -535,6 +593,14 @@ export interface PolicyState {
* a policy set.
*/
policyDefinitionReferenceId?: string;
/**
* Compliance state of the resource.
*/
complianceState?: string;
/**
* Policy evaluation details.
*/
policyEvaluationDetails?: PolicyEvaluationDetails;
/**
* Describes unknown properties. The value of an unknown property can be of "any" type.
*/
Expand Down Expand Up @@ -748,6 +814,11 @@ export interface QueryOptions {
* OData apply expression for aggregations.
*/
apply?: string;
/**
* The $expand query parameter. For example, to expand policyEvaluationDetails, use
* $expand=policyEvaluationDetails
*/
expand?: string;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions lib/services/policyinsightsManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ exports.RemediationDeployment = require('./remediationDeployment');
exports.ErrorResponse = require('./errorResponse');
exports.PolicyEvent = require('./policyEvent');
exports.PolicyEventsQueryResults = require('./policyEventsQueryResults');
exports.ExpressionEvaluationDetails = require('./expressionEvaluationDetails');
exports.IfNotExistsEvaluationDetails = require('./ifNotExistsEvaluationDetails');
exports.PolicyEvaluationDetails = require('./policyEvaluationDetails');
exports.PolicyState = require('./policyState');
exports.PolicyStatesQueryResults = require('./policyStatesQueryResults');
exports.SummaryResults = require('./summaryResults');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* 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';

/**
* Policy evaluation details.
*
*/
class PolicyEvaluationDetails {
/**
* Create a PolicyEvaluationDetails.
* @property {array} [evaluatedExpressions] Details of the evaluated
* expressions.
* @property {object} [ifNotExistsDetails] Evaluation details of IfNotExists
* effect.
* @property {string} [ifNotExistsDetails.resourceId] ID of the last
* evaluated resource for IfNotExists effect.
* @property {number} [ifNotExistsDetails.totalResources] Total number of
* resources to which the existence condition is applicable.
*/
constructor() {
}

/**
* Defines the metadata of PolicyEvaluationDetails
*
* @returns {object} metadata of PolicyEvaluationDetails
*
*/
mapper() {
return {
required: false,
serializedName: 'PolicyEvaluationDetails',
type: {
name: 'Composite',
className: 'PolicyEvaluationDetails',
modelProperties: {
evaluatedExpressions: {
required: false,
serializedName: 'evaluatedExpressions',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ExpressionEvaluationDetailsElementType',
type: {
name: 'Composite',
className: 'ExpressionEvaluationDetails'
}
}
}
},
ifNotExistsDetails: {
required: false,
serializedName: 'ifNotExistsDetails',
type: {
name: 'Composite',
className: 'IfNotExistsEvaluationDetails'
}
}
}
}
};
}
}

module.exports = PolicyEvaluationDetails;
26 changes: 26 additions & 0 deletions lib/services/policyinsightsManagement/lib/models/policyState.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ class PolicyState {
* @property {string} [policyDefinitionReferenceId] Reference ID for the
* policy definition inside the policy set, if the policy assignment is for a
* policy set.
* @property {string} [complianceState] Compliance state of the resource.
* @property {object} [policyEvaluationDetails] Policy evaluation details.
* @property {array} [policyEvaluationDetails.evaluatedExpressions] Details
* of the evaluated expressions.
* @property {object} [policyEvaluationDetails.ifNotExistsDetails] Evaluation
* details of IfNotExists effect.
* @property {string} [policyEvaluationDetails.ifNotExistsDetails.resourceId]
* ID of the last evaluated resource for IfNotExists effect.
* @property {number}
* [policyEvaluationDetails.ifNotExistsDetails.totalResources] Total number
* of resources to which the existence condition is applicable.
*/
constructor() {
}
Expand Down Expand Up @@ -277,6 +288,21 @@ class PolicyState {
type: {
name: 'String'
}
},
complianceState: {
required: false,
serializedName: 'complianceState',
type: {
name: 'String'
}
},
policyEvaluationDetails: {
required: false,
serializedName: 'policyEvaluationDetails',
type: {
name: 'Composite',
className: 'PolicyEvaluationDetails'
}
}
}
}
Expand Down
Loading