-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add first version of .NET SDK for Policy Insights RP (#4117)
* Add SDK for PolicyInsights with initial set of tests (incomplete) * Rest of the scope tests * Minor changes * Add query option tests * Add policy insights to documentation files * Changes requested as part of PR * Fix generate.cmd * Run generate to generate metadata * Change version as suggested * Remove hardcoded paths * Add subscription ID to recorded session data instead of setting it in code * Remove commented out code
- Loading branch information
1 parent
e084a59
commit 9b7419c
Showing
79 changed files
with
14,889 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!--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--> | ||
<PropertyGroup> | ||
<AzureApiTag>PolicyInsights_2017-12-12-preview;</AzureApiTag> | ||
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags> | ||
</PropertyGroup> | ||
</Project> |
46 changes: 46 additions & 0 deletions
46
src/SDKs/PolicyInsights/Management/Management.PolicyInsights/Generated/IOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.PolicyInsights | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Operations operations. | ||
/// </summary> | ||
public partial interface IOperations | ||
{ | ||
/// <summary> | ||
/// Lists available operations. | ||
/// </summary> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<OperationsListResults>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
270 changes: 270 additions & 0 deletions
270
.../PolicyInsights/Management/Management.PolicyInsights/Generated/IPolicyEventsOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,270 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.PolicyInsights | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// PolicyEventsOperations operations. | ||
/// </summary> | ||
public partial interface IPolicyEventsOperations | ||
{ | ||
/// <summary> | ||
/// Queries policy events for the resources under the management group. | ||
/// </summary> | ||
/// <param name='managementGroupName'> | ||
/// Management group name. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForManagementGroupWithHttpMessagesAsync(string managementGroupName, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the resources under the subscription. | ||
/// </summary> | ||
/// <param name='subscriptionId'> | ||
/// Microsoft Azure subscription ID. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForSubscriptionWithHttpMessagesAsync(string subscriptionId, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the resources under the resource group. | ||
/// </summary> | ||
/// <param name='subscriptionId'> | ||
/// Microsoft Azure subscription ID. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// Resource group name. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForResourceGroupWithHttpMessagesAsync(string subscriptionId, string resourceGroupName, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the resource. | ||
/// </summary> | ||
/// <param name='resourceId'> | ||
/// Resource ID. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForResourceWithHttpMessagesAsync(string resourceId, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the subscription level policy set | ||
/// definition. | ||
/// </summary> | ||
/// <param name='subscriptionId'> | ||
/// Microsoft Azure subscription ID. | ||
/// </param> | ||
/// <param name='policySetDefinitionName'> | ||
/// Policy set definition name. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForPolicySetDefinitionWithHttpMessagesAsync(string subscriptionId, string policySetDefinitionName, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the subscription level policy definition. | ||
/// </summary> | ||
/// <param name='subscriptionId'> | ||
/// Microsoft Azure subscription ID. | ||
/// </param> | ||
/// <param name='policyDefinitionName'> | ||
/// Policy definition name. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForPolicyDefinitionWithHttpMessagesAsync(string subscriptionId, string policyDefinitionName, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the subscription level policy assignment. | ||
/// </summary> | ||
/// <param name='subscriptionId'> | ||
/// Microsoft Azure subscription ID. | ||
/// </param> | ||
/// <param name='policyAssignmentName'> | ||
/// Policy assignment name. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForSubscriptionLevelPolicyAssignmentWithHttpMessagesAsync(string subscriptionId, string policyAssignmentName, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Queries policy events for the resource group level policy | ||
/// assignment. | ||
/// </summary> | ||
/// <param name='subscriptionId'> | ||
/// Microsoft Azure subscription ID. | ||
/// </param> | ||
/// <param name='resourceGroupName'> | ||
/// Resource group name. | ||
/// </param> | ||
/// <param name='policyAssignmentName'> | ||
/// Policy assignment name. | ||
/// </param> | ||
/// <param name='queryOptions'> | ||
/// Additional parameters for the operation | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<PolicyEventsQueryResults>> ListQueryResultsForResourceGroupLevelPolicyAssignmentWithHttpMessagesAsync(string subscriptionId, string resourceGroupName, string policyAssignmentName, QueryOptions queryOptions = default(QueryOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Gets OData metadata XML document. | ||
/// </summary> | ||
/// <param name='scope'> | ||
/// A valid scope, i.e. management group, subscription, resource group, | ||
/// or resource ID. Scope used has no effect on metadata returned. | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="QueryFailureException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<string>> GetMetadataWithHttpMessagesAsync(string scope, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
Oops, something went wrong.