Skip to content
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
8 changes: 4 additions & 4 deletions eng/mgmt/mgmtmetadata/security_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/security/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\git\azure-sdk-for-net\sdk
2019-09-18 07:13:49 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/security/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\github\liran\azure-sdk-for-net\sdk
2019-11-07 13:57:09 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 626308502df9fd4b4a7fafed44eceba9ee7ef1bf
Commit: 80a458c51677166e259b90316678e16c1ec614a0
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Bootstrapper version: autorest@2.0.4407
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ public partial interface IJitNetworkAccessPoliciesOperations
/// <param name='virtualMachines'>
/// A list of virtual machines &amp; ports to open access for
/// </param>
/// <param name='justification'>
/// The justification for making the initiate request
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -219,7 +222,7 @@ public partial interface IJitNetworkAccessPoliciesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<JitNetworkAccessRequest>> InitiateWithHttpMessagesAsync(string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<JitNetworkAccessRequest>> InitiateWithHttpMessagesAsync(string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, string justification = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Policies for protecting resources using Just-in-Time access
/// control.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,10 @@ public partial interface ISecurityCenterClient : System.IDisposable
/// </summary>
IServerVulnerabilityAssessmentOperations ServerVulnerabilityAssessment { get; }

/// <summary>
/// Gets the ISubAssessmentsOperations.
/// </summary>
ISubAssessmentsOperations SubAssessments { get; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
// <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>
/// SubAssessmentsOperations operations.
/// </summary>
public partial interface ISubAssessmentsOperations
{
/// <summary>
/// Get security sub-assessments on all your scanned resources inside a
/// subscription scope
/// </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<IPage<SecuritySubAssessment>>> ListAllWithHttpMessagesAsync(string scope, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get security sub-assessments on all your scanned resources inside a
/// scope
/// </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='assessmentName'>
/// The Assessment Key - Unique key for the assessment type
/// </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<IPage<SecuritySubAssessment>>> ListWithHttpMessagesAsync(string scope, string assessmentName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get a security sub-assessment on your scanned resource
/// </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='assessmentName'>
/// The Assessment Key - Unique key for the assessment type
/// </param>
/// <param name='subAssessmentName'>
/// The Sub-Assessment Key - Unique key for the sub-assessment type
/// </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<SecuritySubAssessment>> GetWithHttpMessagesAsync(string scope, string assessmentName, string subAssessmentName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get security sub-assessments on all your scanned resources inside a
/// subscription scope
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </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<IPage<SecuritySubAssessment>>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get security sub-assessments on all your scanned resources inside a
/// scope
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </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<IPage<SecuritySubAssessment>>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,9 @@ internal JitNetworkAccessPoliciesOperations(SecurityCenterClient client)
/// <param name='virtualMachines'>
/// A list of virtual machines &amp; ports to open access for
/// </param>
/// <param name='justification'>
/// The justification for making the initiate request
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -1542,7 +1545,7 @@ internal JitNetworkAccessPoliciesOperations(SecurityCenterClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<JitNetworkAccessRequest>> InitiateWithHttpMessagesAsync(string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<JitNetworkAccessRequest>> InitiateWithHttpMessagesAsync(string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, string justification = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
Expand Down Expand Up @@ -1599,9 +1602,10 @@ internal JitNetworkAccessPoliciesOperations(SecurityCenterClient client)
string jitNetworkAccessPolicyInitiateType = "initiate";
string apiVersion = "2015-06-01-preview";
JitNetworkAccessPolicyInitiateRequest body = new JitNetworkAccessPolicyInitiateRequest();
if (virtualMachines != null)
if (virtualMachines != null || justification != null)
{
body.VirtualMachines = virtualMachines;
body.Justification = justification;
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,12 @@ public static void Delete(this IJitNetworkAccessPoliciesOperations operations, s
/// <param name='virtualMachines'>
/// A list of virtual machines &amp; ports to open access for
/// </param>
public static JitNetworkAccessRequest Initiate(this IJitNetworkAccessPoliciesOperations operations, string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines)
/// <param name='justification'>
/// The justification for making the initiate request
/// </param>
public static JitNetworkAccessRequest Initiate(this IJitNetworkAccessPoliciesOperations operations, string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, string justification = default(string))
{
return operations.InitiateAsync(resourceGroupName, jitNetworkAccessPolicyName, virtualMachines).GetAwaiter().GetResult();
return operations.InitiateAsync(resourceGroupName, jitNetworkAccessPolicyName, virtualMachines, justification).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -323,12 +326,15 @@ public static JitNetworkAccessRequest Initiate(this IJitNetworkAccessPoliciesOpe
/// <param name='virtualMachines'>
/// A list of virtual machines &amp; ports to open access for
/// </param>
/// <param name='justification'>
/// The justification for making the initiate request
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<JitNetworkAccessRequest> InitiateAsync(this IJitNetworkAccessPoliciesOperations operations, string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<JitNetworkAccessRequest> InitiateAsync(this IJitNetworkAccessPoliciesOperations operations, string resourceGroupName, string jitNetworkAccessPolicyName, IList<JitNetworkAccessPolicyInitiateVirtualMachine> virtualMachines, string justification = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.InitiateWithHttpMessagesAsync(resourceGroupName, jitNetworkAccessPolicyName, virtualMachines, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.InitiateWithHttpMessagesAsync(resourceGroupName, jitNetworkAccessPolicyName, virtualMachines, justification, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// <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 System.Linq;

/// <summary>
/// Details of the sub-assessment
/// </summary>
public partial class AdditionalData
{
/// <summary>
/// Initializes a new instance of the AdditionalData class.
/// </summary>
public AdditionalData()
{
CustomInit();
}


/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public AppWhitelistingGroup()
/// <param name="location">Location where the resource is
/// stored</param>
/// <param name="enforcementMode">Possible values include: 'Audit',
/// 'Enforce'</param>
/// 'Enforce', 'None'</param>
/// <param name="configurationStatus">Possible values include:
/// 'Configured', 'NotConfigured', 'InProgress', 'Failed',
/// 'NoStatus'</param>
Expand All @@ -46,13 +46,14 @@ public AppWhitelistingGroup()
/// <param name="sourceSystem">Possible values include:
/// 'Azure_AppLocker', 'Azure_AuditD', 'NonAzure_AppLocker',
/// 'NonAzure_AuditD', 'None'</param>
public AppWhitelistingGroup(string id = default(string), string name = default(string), string type = default(string), string location = default(string), string enforcementMode = default(string), string configurationStatus = default(string), string recommendationStatus = default(string), IList<AppWhitelistingIssueSummary> issues = default(IList<AppWhitelistingIssueSummary>), string sourceSystem = default(string), IList<VmRecommendation> vmRecommendations = default(IList<VmRecommendation>), IList<PathRecommendation> pathRecommendations = default(IList<PathRecommendation>))
public AppWhitelistingGroup(string id = default(string), string name = default(string), string type = default(string), string location = default(string), string enforcementMode = default(string), ProtectionMode protectionMode = default(ProtectionMode), string configurationStatus = default(string), string recommendationStatus = default(string), IList<AppWhitelistingIssueSummary> issues = default(IList<AppWhitelistingIssueSummary>), string sourceSystem = default(string), IList<VmRecommendation> vmRecommendations = default(IList<VmRecommendation>), IList<PathRecommendation> pathRecommendations = default(IList<PathRecommendation>))
{
Id = id;
Name = name;
Type = type;
Location = location;
EnforcementMode = enforcementMode;
ProtectionMode = protectionMode;
ConfigurationStatus = configurationStatus;
RecommendationStatus = recommendationStatus;
Issues = issues;
Expand Down Expand Up @@ -92,11 +93,16 @@ public AppWhitelistingGroup()
public string Location { get; private set; }

/// <summary>
/// Gets or sets possible values include: 'Audit', 'Enforce'
/// Gets or sets possible values include: 'Audit', 'Enforce', 'None'
/// </summary>
[JsonProperty(PropertyName = "properties.enforcementMode")]
public string EnforcementMode { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "properties.protectionMode")]
public ProtectionMode ProtectionMode { get; set; }

/// <summary>
/// Gets or sets possible values include: 'Configured',
/// 'NotConfigured', 'InProgress', 'Failed', 'NoStatus'
Expand Down
Loading