forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.NET SDK Resource Provider:'SecurityCenter'
REST Spec PR 'Azure/azure-rest-api-specs#5649' REST Spec PR Author 'chlahav' REST Spec PR Last commit
- Loading branch information
Showing
13 changed files
with
818 additions
and
48 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/SDKs/SecurityCenter/Management.SecurityCenter/AzSdk.RP.props
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 |
---|---|---|
@@ -1,7 +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>Security_2017-08-01-preview;Security_2019-01-01;Security_2015-06-01-preview;Security_2019-01-01-preview;Security_2018-06-01;</AzureApiTag> | ||
<AzureApiTag>Security_2017-08-01-preview;Security_2019-01-01;Security_2015-06-01-preview;Security_2019-01-01-preview;Security_2017-08-01;Security_2018-06-01;</AzureApiTag> | ||
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags> | ||
</PropertyGroup> | ||
</Project> |
425 changes: 425 additions & 0 deletions
425
src/SDKs/SecurityCenter/Management.SecurityCenter/Generated/ComplianceResultsOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
103 changes: 103 additions & 0 deletions
103
...curityCenter/Management.SecurityCenter/Generated/ComplianceResultsOperationsExtensions.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,103 @@ | ||
// <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.Security | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for ComplianceResultsOperations. | ||
/// </summary> | ||
public static partial class ComplianceResultsOperationsExtensions | ||
{ | ||
/// <summary> | ||
/// Security compliance results in the subscription | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// Scope of the query, can be subscription | ||
/// (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group | ||
/// (/providers/Microsoft.Management/managementGroups/mgName). | ||
/// </param> | ||
public static ComplianceResultList List(this IComplianceResultsOperations operations, string scope) | ||
{ | ||
return operations.ListAsync(scope).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Security compliance results in the subscription | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='scope'> | ||
/// Scope of the query, can be subscription | ||
/// (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group | ||
/// (/providers/Microsoft.Management/managementGroups/mgName). | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<ComplianceResultList> ListAsync(this IComplianceResultsOperations operations, string scope, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.ListWithHttpMessagesAsync(scope, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Security Compliance Result | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceId'> | ||
/// The identifier of the resource. | ||
/// </param> | ||
/// <param name='complianceResultName'> | ||
/// name of the desired assessment compliance result | ||
/// </param> | ||
public static ComplianceResult Get(this IComplianceResultsOperations operations, string resourceId, string complianceResultName) | ||
{ | ||
return operations.GetAsync(resourceId, complianceResultName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <summary> | ||
/// Security Compliance Result | ||
/// </summary> | ||
/// <param name='operations'> | ||
/// The operations group for this extension method. | ||
/// </param> | ||
/// <param name='resourceId'> | ||
/// The identifier of the resource. | ||
/// </param> | ||
/// <param name='complianceResultName'> | ||
/// name of the desired assessment compliance result | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<ComplianceResult> GetAsync(this IComplianceResultsOperations operations, string resourceId, string complianceResultName, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.GetWithHttpMessagesAsync(resourceId, complianceResultName, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
} | ||
} |
76 changes: 76 additions & 0 deletions
76
src/SDKs/SecurityCenter/Management.SecurityCenter/Generated/IComplianceResultsOperations.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,76 @@ | ||
// <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.Security | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// ComplianceResultsOperations operations. | ||
/// </summary> | ||
public partial interface IComplianceResultsOperations | ||
{ | ||
/// <summary> | ||
/// Security compliance results in the subscription | ||
/// </summary> | ||
/// <param name='scope'> | ||
/// Scope of the query, can be subscription | ||
/// (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management | ||
/// group (/providers/Microsoft.Management/managementGroups/mgName). | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// 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<ComplianceResultList>> ListWithHttpMessagesAsync(string scope, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Security Compliance Result | ||
/// </summary> | ||
/// <param name='resourceId'> | ||
/// The identifier of the resource. | ||
/// </param> | ||
/// <param name='complianceResultName'> | ||
/// name of the desired assessment compliance result | ||
/// </param> | ||
/// <param name='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// 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<ComplianceResult>> GetWithHttpMessagesAsync(string resourceId, string complianceResultName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
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
72 changes: 72 additions & 0 deletions
72
src/SDKs/SecurityCenter/Management.SecurityCenter/Generated/Models/AssessmentStatus.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,72 @@ | ||
// <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.Security.Models | ||
{ | ||
using Newtonsoft.Json; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// The result of the assessment | ||
/// </summary> | ||
public partial class AssessmentStatus | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the AssessmentStatus class. | ||
/// </summary> | ||
public AssessmentStatus() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AssessmentStatus class. | ||
/// </summary> | ||
/// <param name="code">Programmatic code for the status of the | ||
/// assessment. Possible values include: 'Healthy', 'Unhealthy', | ||
/// 'NotApplicable'</param> | ||
/// <param name="cause">Programmatic code for the cause of the | ||
/// assessment status</param> | ||
/// <param name="description">Human readable description of the | ||
/// assessment status</param> | ||
public AssessmentStatus(string code = default(string), string cause = default(string), string description = default(string)) | ||
{ | ||
Code = code; | ||
Cause = cause; | ||
Description = description; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets programmatic code for the status of the assessment. Possible | ||
/// values include: 'Healthy', 'Unhealthy', 'NotApplicable' | ||
/// </summary> | ||
[JsonProperty(PropertyName = "code")] | ||
public string Code { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets programmatic code for the cause of the assessment status | ||
/// </summary> | ||
[JsonProperty(PropertyName = "cause")] | ||
public string Cause { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets human readable description of the assessment status | ||
/// </summary> | ||
[JsonProperty(PropertyName = "description")] | ||
public string Description { get; private set; } | ||
|
||
} | ||
} |
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
62 changes: 62 additions & 0 deletions
62
src/SDKs/SecurityCenter/Management.SecurityCenter/Generated/Models/ComplianceResult.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,62 @@ | ||
// <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.Security.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Newtonsoft.Json; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// a compliance result | ||
/// </summary> | ||
[Rest.Serialization.JsonTransformation] | ||
public partial class ComplianceResult : Resource | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ComplianceResult class. | ||
/// </summary> | ||
public ComplianceResult() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the ComplianceResult class. | ||
/// </summary> | ||
/// <param name="id">Resource Id</param> | ||
/// <param name="name">Resource name</param> | ||
/// <param name="type">Resource type</param> | ||
/// <param name="resourceStatus">The status of the resource regarding a | ||
/// single assessment. Possible values include: 'Healthy', | ||
/// 'NotApplicable', 'OffByPolicy', 'NotHealthy'</param> | ||
public ComplianceResult(string id = default(string), string name = default(string), string type = default(string), string resourceStatus = default(string)) | ||
: base(id, name, type) | ||
{ | ||
ResourceStatus = resourceStatus; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets the status of the resource regarding a single assessment. | ||
/// Possible values include: 'Healthy', 'NotApplicable', 'OffByPolicy', | ||
/// 'NotHealthy' | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.resourceStatus")] | ||
public string ResourceStatus { get; private set; } | ||
|
||
} | ||
} |
Oops, something went wrong.