/// <summary> /// Creating a server vulnerability assessment on a resource, which will /// onboard a resource for having a vulnerability assessment on it /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='resourceNamespace'> /// The Namespace of the resource. /// </param> /// <param name='resourceType'> /// The type of the resource. /// </param> /// <param name='resourceName'> /// Name of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerVulnerabilityAssessment> CreateOrUpdateAsync(this IServerVulnerabilityAssessmentOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { ComplianceResults = new ComplianceResultsOperations(this); Pricings = new PricingsOperations(this); Alerts = new AlertsOperations(this); Settings = new SettingsOperations(this); DeviceSecurityGroups = new DeviceSecurityGroupsOperations(this); IotSecuritySolution = new IotSecuritySolutionOperations(this); IotSecuritySolutionAnalytics = new IotSecuritySolutionAnalyticsOperations(this); IotSecuritySolutionsAnalyticsAggregatedAlert = new IotSecuritySolutionsAnalyticsAggregatedAlertOperations(this); IotSecuritySolutionsAnalyticsRecommendation = new IotSecuritySolutionsAnalyticsRecommendationOperations(this); AllowedConnections = new AllowedConnectionsOperations(this); DiscoveredSecuritySolutions = new DiscoveredSecuritySolutionsOperations(this); ExternalSecuritySolutions = new ExternalSecuritySolutionsOperations(this); JitNetworkAccessPolicies = new JitNetworkAccessPoliciesOperations(this); AdaptiveApplicationControls = new AdaptiveApplicationControlsOperations(this); Locations = new LocationsOperations(this); Operations = new Operations(this); Tasks = new TasksOperations(this); Topology = new TopologyOperations(this); AdvancedThreatProtection = new AdvancedThreatProtectionOperations(this); AutoProvisioningSettings = new AutoProvisioningSettingsOperations(this); Compliances = new CompliancesOperations(this); InformationProtectionPolicies = new InformationProtectionPoliciesOperations(this); SecurityContacts = new SecurityContactsOperations(this); WorkspaceSettings = new WorkspaceSettingsOperations(this); RegulatoryComplianceStandards = new RegulatoryComplianceStandardsOperations(this); RegulatoryComplianceControls = new RegulatoryComplianceControlsOperations(this); RegulatoryComplianceAssessments = new RegulatoryComplianceAssessmentsOperations(this); ServerVulnerabilityAssessment = new ServerVulnerabilityAssessmentOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ExternalSecuritySolution>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ExternalSecuritySolution>("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Gets a server vulnerability assessment onboarding statuses on a given /// resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='resourceNamespace'> /// The Namespace of the resource. /// </param> /// <param name='resourceType'> /// The type of the resource. /// </param> /// <param name='resourceName'> /// Name of the resource. /// </param> public static ServerVulnerabilityAssessment Get(this IServerVulnerabilityAssessmentOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) { return(operations.GetAsync(resourceGroupName, resourceNamespace, resourceType, resourceName).GetAwaiter().GetResult()); }
/// <summary> /// Removing server vulnerability assessment from a resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='resourceNamespace'> /// The Namespace of the resource. /// </param> /// <param name='resourceType'> /// The type of the resource. /// </param> /// <param name='resourceName'> /// Name of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IServerVulnerabilityAssessmentOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Removing server vulnerability assessment from a resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. The name is /// case insensitive. /// </param> /// <param name='resourceNamespace'> /// The Namespace of the resource. /// </param> /// <param name='resourceType'> /// The type of the resource. /// </param> /// <param name='resourceName'> /// Name of the resource. /// </param> public static void Delete(this IServerVulnerabilityAssessmentOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) { operations.DeleteAsync(resourceGroupName, resourceNamespace, resourceType, resourceName).GetAwaiter().GetResult(); }