/// <summary> /// Gets the software inventory of the virtual machine. /// </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 <IPage <Software> > ListByExtendedResourceAsync(this ISoftwareInventoriesOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByExtendedResourceWithHttpMessagesAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the software inventory of all virtual machines in the subscriptions. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Software> > ListBySubscriptionAsync(this ISoftwareInventoriesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the software inventory of the virtual machine. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Software> > ListByExtendedResourceNextAsync(this ISoftwareInventoriesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByExtendedResourceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { ComplianceResults = new ComplianceResultsOperations(this); Pricings = new PricingsOperations(this); AdvancedThreatProtection = new AdvancedThreatProtectionOperations(this); DeviceSecurityGroups = new DeviceSecurityGroupsOperations(this); IotSecuritySolution = new IotSecuritySolutionOperations(this); IotSecuritySolutionAnalytics = new IotSecuritySolutionAnalyticsOperations(this); IotSecuritySolutionsAnalyticsAggregatedAlert = new IotSecuritySolutionsAnalyticsAggregatedAlertOperations(this); IotSecuritySolutionsAnalyticsRecommendation = new IotSecuritySolutionsAnalyticsRecommendationOperations(this); Locations = new LocationsOperations(this); Operations = new Operations(this); Tasks = new TasksOperations(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); SubAssessments = new SubAssessmentsOperations(this); Automations = new AutomationsOperations(this); AlertsSuppressionRules = new AlertsSuppressionRulesOperations(this); ServerVulnerabilityAssessment = new ServerVulnerabilityAssessmentOperations(this); AssessmentsMetadata = new AssessmentsMetadataOperations(this); Assessments = new AssessmentsOperations(this); AdaptiveApplicationControls = new AdaptiveApplicationControlsOperations(this); AdaptiveNetworkHardenings = new AdaptiveNetworkHardeningsOperations(this); AllowedConnections = new AllowedConnectionsOperations(this); Topology = new TopologyOperations(this); JitNetworkAccessPolicies = new JitNetworkAccessPoliciesOperations(this); DiscoveredSecuritySolutions = new DiscoveredSecuritySolutionsOperations(this); SecuritySolutionsReferenceData = new SecuritySolutionsReferenceDataOperations(this); ExternalSecuritySolutions = new ExternalSecuritySolutionsOperations(this); SecureScores = new SecureScoresOperations(this); SecureScoreControls = new SecureScoreControlsOperations(this); SecureScoreControlDefinitions = new SecureScoreControlDefinitionsOperations(this); SecuritySolutions = new SecuritySolutionsOperations(this); Connectors = new ConnectorsOperations(this); SqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansOperations(this); SqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsOperations(this); SqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesOperations(this); Alerts = new AlertsOperations(this); Settings = new SettingsOperations(this); IngestionSettings = new IngestionSettingsOperations(this); SoftwareInventories = new SoftwareInventoriesOperations(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 <CustomAlertRule>("ruleType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <CustomAlertRule>("ruleType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ResourceDetails>("source")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ResourceDetails>("source")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <AdditionalData>("assessedResourceType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AdditionalData>("assessedResourceType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <AutomationAction>("actionType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AutomationAction>("actionType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ExternalSecuritySolution>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ExternalSecuritySolution>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <AuthenticationDetailsProperties>("authenticationType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AuthenticationDetailsProperties>("authenticationType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ResourceIdentifier>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ResourceIdentifier>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <AlertSimulatorRequestProperties>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <AlertSimulatorRequestProperties>("kind")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Setting>("kind")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Setting>("kind")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Gets the software inventory of all virtual machines in the subscriptions. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Software> ListBySubscription(this ISoftwareInventoriesOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets the software inventory of the virtual machine. /// </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 IPage <Software> ListByExtendedResource(this ISoftwareInventoriesOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName) { return(operations.ListByExtendedResourceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName).GetAwaiter().GetResult()); }
/// <summary> /// Gets the software inventory of all virtual machines in the subscriptions. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <Software> ListBySubscriptionNext(this ISoftwareInventoriesOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets a single software data of the virtual machine. /// </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='softwareName'> /// Name of the installed software. /// </param> public static Software Get(this ISoftwareInventoriesOperations operations, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string softwareName) { return(operations.GetAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, softwareName).GetAwaiter().GetResult()); }