Skip to content

Commit ae17364

Browse files
committed
.NET SDK Resource Provider:'PolicyInsights'
REST Spec PR 'Azure/azure-rest-api-specs#5408' REST Spec PR Author 'j5lim' REST Spec PR Last commit
1 parent efe8af8 commit ae17364

File tree

12 files changed

+295
-41
lines changed

12 files changed

+295
-41
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
33
<PropertyGroup>
4-
<AzureApiTag>PolicyInsights_2018-04-04;PolicyInsights_2018-07-01-preview;</AzureApiTag>
4+
<AzureApiTag>PolicyInsights_2018-07-01-preview;PolicyInsights_2018-04-04;</AzureApiTag>
55
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
66
</PropertyGroup>
77
</Project>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.PolicyInsights.Models
12+
{
13+
using Newtonsoft.Json;
14+
using System.Linq;
15+
16+
/// <summary>
17+
/// Evaluation details of policy language expressions.
18+
/// </summary>
19+
public partial class ExpressionEvaluationDetails
20+
{
21+
/// <summary>
22+
/// Initializes a new instance of the ExpressionEvaluationDetails
23+
/// class.
24+
/// </summary>
25+
public ExpressionEvaluationDetails()
26+
{
27+
CustomInit();
28+
}
29+
30+
/// <summary>
31+
/// Initializes a new instance of the ExpressionEvaluationDetails
32+
/// class.
33+
/// </summary>
34+
/// <param name="result">Evaluation result.</param>
35+
/// <param name="expression">Expression evaluated.</param>
36+
/// <param name="path">Property path if the expression is a field or an
37+
/// alias.</param>
38+
/// <param name="expressionValue">Value of the expression.</param>
39+
/// <param name="targetValue">Target value to be compared with the
40+
/// expression value.</param>
41+
/// <param name="operatorProperty">Operator to compare the expression
42+
/// value and the target value.</param>
43+
public ExpressionEvaluationDetails(string result = default(string), string expression = default(string), string path = default(string), object expressionValue = default(object), object targetValue = default(object), string operatorProperty = default(string))
44+
{
45+
Result = result;
46+
Expression = expression;
47+
Path = path;
48+
ExpressionValue = expressionValue;
49+
TargetValue = targetValue;
50+
OperatorProperty = operatorProperty;
51+
CustomInit();
52+
}
53+
54+
/// <summary>
55+
/// An initialization method that performs custom operations like setting defaults
56+
/// </summary>
57+
partial void CustomInit();
58+
59+
/// <summary>
60+
/// Gets or sets evaluation result.
61+
/// </summary>
62+
[JsonProperty(PropertyName = "result")]
63+
public string Result { get; set; }
64+
65+
/// <summary>
66+
/// Gets or sets expression evaluated.
67+
/// </summary>
68+
[JsonProperty(PropertyName = "expression")]
69+
public string Expression { get; set; }
70+
71+
/// <summary>
72+
/// Gets or sets property path if the expression is a field or an
73+
/// alias.
74+
/// </summary>
75+
[JsonProperty(PropertyName = "path")]
76+
public string Path { get; set; }
77+
78+
/// <summary>
79+
/// Gets or sets value of the expression.
80+
/// </summary>
81+
[JsonProperty(PropertyName = "expressionValue")]
82+
public object ExpressionValue { get; set; }
83+
84+
/// <summary>
85+
/// Gets or sets target value to be compared with the expression value.
86+
/// </summary>
87+
[JsonProperty(PropertyName = "targetValue")]
88+
public object TargetValue { get; set; }
89+
90+
/// <summary>
91+
/// Gets or sets operator to compare the expression value and the
92+
/// target value.
93+
/// </summary>
94+
[JsonProperty(PropertyName = "operator")]
95+
public string OperatorProperty { get; set; }
96+
97+
}
98+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.PolicyInsights.Models
12+
{
13+
using Newtonsoft.Json;
14+
using System.Linq;
15+
16+
/// <summary>
17+
/// Evaluation details of IfNotExists effect.
18+
/// </summary>
19+
public partial class IfNotExistsEvaluationDetails
20+
{
21+
/// <summary>
22+
/// Initializes a new instance of the IfNotExistsEvaluationDetails
23+
/// class.
24+
/// </summary>
25+
public IfNotExistsEvaluationDetails()
26+
{
27+
CustomInit();
28+
}
29+
30+
/// <summary>
31+
/// Initializes a new instance of the IfNotExistsEvaluationDetails
32+
/// class.
33+
/// </summary>
34+
/// <param name="resourceId">ID of the last evaluated resource for
35+
/// IfNotExists effect.</param>
36+
/// <param name="totalResources">Total number of resources to which the
37+
/// existence condition is applicable.</param>
38+
public IfNotExistsEvaluationDetails(string resourceId = default(string), int? totalResources = default(int?))
39+
{
40+
ResourceId = resourceId;
41+
TotalResources = totalResources;
42+
CustomInit();
43+
}
44+
45+
/// <summary>
46+
/// An initialization method that performs custom operations like setting defaults
47+
/// </summary>
48+
partial void CustomInit();
49+
50+
/// <summary>
51+
/// Gets or sets ID of the last evaluated resource for IfNotExists
52+
/// effect.
53+
/// </summary>
54+
[JsonProperty(PropertyName = "resourceId")]
55+
public string ResourceId { get; set; }
56+
57+
/// <summary>
58+
/// Gets or sets total number of resources to which the existence
59+
/// condition is applicable.
60+
/// </summary>
61+
[JsonProperty(PropertyName = "totalResources")]
62+
public int? TotalResources { get; set; }
63+
64+
}
65+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Azure.Management.PolicyInsights.Models
12+
{
13+
using Newtonsoft.Json;
14+
using System.Collections;
15+
using System.Collections.Generic;
16+
using System.Linq;
17+
18+
/// <summary>
19+
/// Policy evaluation details.
20+
/// </summary>
21+
public partial class PolicyEvaluationDetails
22+
{
23+
/// <summary>
24+
/// Initializes a new instance of the PolicyEvaluationDetails class.
25+
/// </summary>
26+
public PolicyEvaluationDetails()
27+
{
28+
CustomInit();
29+
}
30+
31+
/// <summary>
32+
/// Initializes a new instance of the PolicyEvaluationDetails class.
33+
/// </summary>
34+
/// <param name="evaluatedExpressions">Details of the evaluated
35+
/// expressions.</param>
36+
/// <param name="ifNotExistsDetails">Evaluation details of IfNotExists
37+
/// effect.</param>
38+
public PolicyEvaluationDetails(IList<ExpressionEvaluationDetails> evaluatedExpressions = default(IList<ExpressionEvaluationDetails>), IfNotExistsEvaluationDetails ifNotExistsDetails = default(IfNotExistsEvaluationDetails))
39+
{
40+
EvaluatedExpressions = evaluatedExpressions;
41+
IfNotExistsDetails = ifNotExistsDetails;
42+
CustomInit();
43+
}
44+
45+
/// <summary>
46+
/// An initialization method that performs custom operations like setting defaults
47+
/// </summary>
48+
partial void CustomInit();
49+
50+
/// <summary>
51+
/// Gets or sets details of the evaluated expressions.
52+
/// </summary>
53+
[JsonProperty(PropertyName = "evaluatedExpressions")]
54+
public IList<ExpressionEvaluationDetails> EvaluatedExpressions { get; set; }
55+
56+
/// <summary>
57+
/// Gets or sets evaluation details of IfNotExists effect.
58+
/// </summary>
59+
[JsonProperty(PropertyName = "ifNotExistsDetails")]
60+
public IfNotExistsEvaluationDetails IfNotExistsDetails { get; set; }
61+
62+
}
63+
}

src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/Models/PolicyEvent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public PolicyEvent()
7474
/// category, if the policy assignment is for a policy set.</param>
7575
/// <param name="policySetDefinitionParameters">Policy set definition
7676
/// parameters, if the policy assignment is for a policy set.</param>
77-
/// <param name="managementGroupIds">Comma seperated list of management
77+
/// <param name="managementGroupIds">Comma separated list of management
7878
/// group IDs, which represent the hierarchy of the management groups
7979
/// the resource is under.</param>
8080
/// <param name="policyDefinitionReferenceId">Reference ID for the
@@ -291,7 +291,7 @@ public PolicyEvent()
291291
public string PolicySetDefinitionParameters { get; set; }
292292

293293
/// <summary>
294-
/// Gets or sets comma seperated list of management group IDs, which
294+
/// Gets or sets comma separated list of management group IDs, which
295295
/// represent the hierarchy of the management groups the resource is
296296
/// under.
297297
/// </summary>

src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/Models/PolicyState.cs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,17 @@ public PolicyState()
7474
/// category, if the policy assignment is for a policy set.</param>
7575
/// <param name="policySetDefinitionParameters">Policy set definition
7676
/// parameters, if the policy assignment is for a policy set.</param>
77-
/// <param name="managementGroupIds">Comma seperated list of management
77+
/// <param name="managementGroupIds">Comma separated list of management
7878
/// group IDs, which represent the hierarchy of the management groups
7979
/// the resource is under.</param>
8080
/// <param name="policyDefinitionReferenceId">Reference ID for the
8181
/// policy definition inside the policy set, if the policy assignment
8282
/// is for a policy set.</param>
83-
public PolicyState(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string odataid = default(string), string odatacontext = default(string), System.DateTime? timestamp = default(System.DateTime?), string resourceId = default(string), string policyAssignmentId = default(string), string policyDefinitionId = default(string), string effectiveParameters = default(string), bool? isCompliant = default(bool?), string subscriptionId = default(string), string resourceType = default(string), string resourceLocation = default(string), string resourceGroup = default(string), string resourceTags = default(string), string policyAssignmentName = default(string), string policyAssignmentOwner = default(string), string policyAssignmentParameters = default(string), string policyAssignmentScope = default(string), string policyDefinitionName = default(string), string policyDefinitionAction = default(string), string policyDefinitionCategory = default(string), string policySetDefinitionId = default(string), string policySetDefinitionName = default(string), string policySetDefinitionOwner = default(string), string policySetDefinitionCategory = default(string), string policySetDefinitionParameters = default(string), string managementGroupIds = default(string), string policyDefinitionReferenceId = default(string))
83+
/// <param name="complianceState">Compliance state of the
84+
/// resource.</param>
85+
/// <param name="policyEvaluationDetails">Policy evaluation
86+
/// details.</param>
87+
public PolicyState(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string odataid = default(string), string odatacontext = default(string), System.DateTime? timestamp = default(System.DateTime?), string resourceId = default(string), string policyAssignmentId = default(string), string policyDefinitionId = default(string), string effectiveParameters = default(string), bool? isCompliant = default(bool?), string subscriptionId = default(string), string resourceType = default(string), string resourceLocation = default(string), string resourceGroup = default(string), string resourceTags = default(string), string policyAssignmentName = default(string), string policyAssignmentOwner = default(string), string policyAssignmentParameters = default(string), string policyAssignmentScope = default(string), string policyDefinitionName = default(string), string policyDefinitionAction = default(string), string policyDefinitionCategory = default(string), string policySetDefinitionId = default(string), string policySetDefinitionName = default(string), string policySetDefinitionOwner = default(string), string policySetDefinitionCategory = default(string), string policySetDefinitionParameters = default(string), string managementGroupIds = default(string), string policyDefinitionReferenceId = default(string), string complianceState = default(string), PolicyEvaluationDetails policyEvaluationDetails = default(PolicyEvaluationDetails))
8488
{
8589
AdditionalProperties = additionalProperties;
8690
Odataid = odataid;
@@ -110,6 +114,8 @@ public PolicyState()
110114
PolicySetDefinitionParameters = policySetDefinitionParameters;
111115
ManagementGroupIds = managementGroupIds;
112116
PolicyDefinitionReferenceId = policyDefinitionReferenceId;
117+
ComplianceState = complianceState;
118+
PolicyEvaluationDetails = policyEvaluationDetails;
113119
CustomInit();
114120
}
115121

@@ -284,7 +290,7 @@ public PolicyState()
284290
public string PolicySetDefinitionParameters { get; set; }
285291

286292
/// <summary>
287-
/// Gets or sets comma seperated list of management group IDs, which
293+
/// Gets or sets comma separated list of management group IDs, which
288294
/// represent the hierarchy of the management groups the resource is
289295
/// under.
290296
/// </summary>
@@ -298,5 +304,17 @@ public PolicyState()
298304
[JsonProperty(PropertyName = "policyDefinitionReferenceId")]
299305
public string PolicyDefinitionReferenceId { get; set; }
300306

307+
/// <summary>
308+
/// Gets or sets compliance state of the resource.
309+
/// </summary>
310+
[JsonProperty(PropertyName = "complianceState")]
311+
public string ComplianceState { get; set; }
312+
313+
/// <summary>
314+
/// Gets or sets policy evaluation details.
315+
/// </summary>
316+
[JsonProperty(PropertyName = "policyEvaluationDetails")]
317+
public PolicyEvaluationDetails PolicyEvaluationDetails { get; set; }
318+
301319
}
302320
}

src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/Models/QueryOptions.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ public QueryOptions()
4646
/// request time.</param>
4747
/// <param name="apply">OData apply expression for
4848
/// aggregations.</param>
49-
public QueryOptions(int? top = default(int?), string filter = default(string), string orderBy = default(string), string select = default(string), System.DateTime? fromProperty = default(System.DateTime?), System.DateTime? to = default(System.DateTime?), string apply = default(string))
49+
/// <param name="expand">The $expand query parameter. For example, to
50+
/// expand policyEvaluationDetails, use
51+
/// $expand=policyEvaluationDetails</param>
52+
public QueryOptions(int? top = default(int?), string filter = default(string), string orderBy = default(string), string select = default(string), System.DateTime? fromProperty = default(System.DateTime?), System.DateTime? to = default(System.DateTime?), string apply = default(string), string expand = default(string))
5053
{
5154
Top = top;
5255
Filter = filter;
@@ -55,6 +58,7 @@ public QueryOptions()
5558
FromProperty = fromProperty;
5659
To = to;
5760
Apply = apply;
61+
Expand = expand;
5862
CustomInit();
5963
}
6064

@@ -113,5 +117,12 @@ public QueryOptions()
113117
[Newtonsoft.Json.JsonIgnore]
114118
public string Apply { get; set; }
115119

120+
/// <summary>
121+
/// Gets or sets the $expand query parameter. For example, to expand
122+
/// policyEvaluationDetails, use $expand=policyEvaluationDetails
123+
/// </summary>
124+
[Newtonsoft.Json.JsonIgnore]
125+
public string Expand { get; set; }
126+
116127
}
117128
}

src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/Models/Remediation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public Remediation()
4848
/// <param name="filters">The filters that will be applied to determine
4949
/// which resources to remediate.</param>
5050
/// <param name="deploymentStatus">The deployment status summary for
51-
/// all deplyoments created by the remediation.</param>
51+
/// all deployments created by the remediation.</param>
5252
/// <param name="id">The ID of the remediation.</param>
5353
/// <param name="type">The type of the remediation.</param>
5454
/// <param name="name">The name of the remediation.</param>
@@ -113,7 +113,7 @@ public Remediation()
113113
public RemediationFilters Filters { get; set; }
114114

115115
/// <summary>
116-
/// Gets or sets the deployment status summary for all deplyoments
116+
/// Gets or sets the deployment status summary for all deployments
117117
/// created by the remediation.
118118
/// </summary>
119119
[JsonProperty(PropertyName = "properties.deploymentStatus")]

src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/Models/RemediationDeploymentSummary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.PolicyInsights.Models
1414
using System.Linq;
1515

1616
/// <summary>
17-
/// The deployment status summary for all deplyoments created by the
17+
/// The deployment status summary for all deployments created by the
1818
/// remediation.
1919
/// </summary>
2020
public partial class RemediationDeploymentSummary

src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/Operations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ internal Operations(PolicyInsightsClient client)
7070
/// </return>
7171
public async Task<AzureOperationResponse<OperationsListResults>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
7272
{
73-
string apiVersion = "2018-04-04";
73+
string apiVersion = "2018-07-01-preview";
7474
// Tracing
7575
bool _shouldTrace = ServiceClientTracing.IsEnabled;
7676
string _invocationId = null;

0 commit comments

Comments
 (0)