Skip to content

Commit 291b447

Browse files
author
SDKAuto
committed
CodeGen from PR 17426 in Azure/azure-rest-api-specs
Merge c08015f4b4c11fada1de2427c209d360dc45a683 into efd3d669a86d2e123f57ac3a43e5af4bb9e3a29f
1 parent 3f1ede7 commit 291b447

File tree

730 files changed

+29412
-22868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

730 files changed

+29412
-22868
lines changed

sdk/security/azure-resourcemanager-security/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2022-02-21)
44

5+
- Azure Resource Manager Security client library for Java. This package contains Microsoft Azure SDK for Security Management SDK. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
56

67
## 1.0.0-beta.1 (2021-07-14)
78

sdk/security/azure-resourcemanager-security/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-security</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/security/azure-resourcemanager-security/SAMPLE.md

Lines changed: 5461 additions & 248 deletions
Large diffs are not rendered by default.

sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/SecurityManager.java

Lines changed: 66 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
11+
import com.azure.core.http.HttpPipelinePosition;
1112
import com.azure.core.http.policy.AddDatePolicy;
1213
import com.azure.core.http.policy.HttpLogOptions;
1314
import com.azure.core.http.policy.HttpLoggingPolicy;
@@ -34,28 +35,20 @@
3435
import com.azure.resourcemanager.security.implementation.ComplianceResultsImpl;
3536
import com.azure.resourcemanager.security.implementation.CompliancesImpl;
3637
import com.azure.resourcemanager.security.implementation.ConnectorsImpl;
38+
import com.azure.resourcemanager.security.implementation.CustomAssessmentAutomationsImpl;
39+
import com.azure.resourcemanager.security.implementation.CustomEntityStoreAssignmentsImpl;
3740
import com.azure.resourcemanager.security.implementation.DeviceSecurityGroupsImpl;
38-
import com.azure.resourcemanager.security.implementation.DevicesForHubsImpl;
39-
import com.azure.resourcemanager.security.implementation.DevicesForSubscriptionsImpl;
40-
import com.azure.resourcemanager.security.implementation.DevicesImpl;
4141
import com.azure.resourcemanager.security.implementation.DiscoveredSecuritySolutionsImpl;
4242
import com.azure.resourcemanager.security.implementation.ExternalSecuritySolutionsImpl;
4343
import com.azure.resourcemanager.security.implementation.InformationProtectionPoliciesImpl;
4444
import com.azure.resourcemanager.security.implementation.IngestionSettingsImpl;
45-
import com.azure.resourcemanager.security.implementation.IotAlertTypesImpl;
46-
import com.azure.resourcemanager.security.implementation.IotAlertsImpl;
47-
import com.azure.resourcemanager.security.implementation.IotDefenderSettingsImpl;
48-
import com.azure.resourcemanager.security.implementation.IotRecommendationTypesImpl;
49-
import com.azure.resourcemanager.security.implementation.IotRecommendationsImpl;
5045
import com.azure.resourcemanager.security.implementation.IotSecuritySolutionAnalyticsImpl;
5146
import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsAnalyticsAggregatedAlertsImpl;
5247
import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsAnalyticsRecommendationsImpl;
5348
import com.azure.resourcemanager.security.implementation.IotSecuritySolutionsImpl;
54-
import com.azure.resourcemanager.security.implementation.IotSensorsImpl;
55-
import com.azure.resourcemanager.security.implementation.IotSitesImpl;
5649
import com.azure.resourcemanager.security.implementation.JitNetworkAccessPoliciesImpl;
5750
import com.azure.resourcemanager.security.implementation.LocationsImpl;
58-
import com.azure.resourcemanager.security.implementation.OnPremiseIotSensorsImpl;
51+
import com.azure.resourcemanager.security.implementation.MdeOnboardingsImpl;
5952
import com.azure.resourcemanager.security.implementation.OperationsImpl;
6053
import com.azure.resourcemanager.security.implementation.PricingsImpl;
6154
import com.azure.resourcemanager.security.implementation.RegulatoryComplianceAssessmentsImpl;
@@ -65,6 +58,7 @@
6558
import com.azure.resourcemanager.security.implementation.SecureScoreControlsImpl;
6659
import com.azure.resourcemanager.security.implementation.SecureScoresImpl;
6760
import com.azure.resourcemanager.security.implementation.SecurityCenterBuilder;
61+
import com.azure.resourcemanager.security.implementation.SecurityConnectorsImpl;
6862
import com.azure.resourcemanager.security.implementation.SecurityContactsImpl;
6963
import com.azure.resourcemanager.security.implementation.SecuritySolutionsImpl;
7064
import com.azure.resourcemanager.security.implementation.SecuritySolutionsReferenceDatasImpl;
@@ -91,28 +85,20 @@
9185
import com.azure.resourcemanager.security.models.ComplianceResults;
9286
import com.azure.resourcemanager.security.models.Compliances;
9387
import com.azure.resourcemanager.security.models.Connectors;
88+
import com.azure.resourcemanager.security.models.CustomAssessmentAutomations;
89+
import com.azure.resourcemanager.security.models.CustomEntityStoreAssignments;
9490
import com.azure.resourcemanager.security.models.DeviceSecurityGroups;
95-
import com.azure.resourcemanager.security.models.Devices;
96-
import com.azure.resourcemanager.security.models.DevicesForHubs;
97-
import com.azure.resourcemanager.security.models.DevicesForSubscriptions;
9891
import com.azure.resourcemanager.security.models.DiscoveredSecuritySolutions;
9992
import com.azure.resourcemanager.security.models.ExternalSecuritySolutions;
10093
import com.azure.resourcemanager.security.models.InformationProtectionPolicies;
10194
import com.azure.resourcemanager.security.models.IngestionSettings;
102-
import com.azure.resourcemanager.security.models.IotAlertTypes;
103-
import com.azure.resourcemanager.security.models.IotAlerts;
104-
import com.azure.resourcemanager.security.models.IotDefenderSettings;
105-
import com.azure.resourcemanager.security.models.IotRecommendationTypes;
106-
import com.azure.resourcemanager.security.models.IotRecommendations;
10795
import com.azure.resourcemanager.security.models.IotSecuritySolutionAnalytics;
10896
import com.azure.resourcemanager.security.models.IotSecuritySolutions;
10997
import com.azure.resourcemanager.security.models.IotSecuritySolutionsAnalyticsAggregatedAlerts;
11098
import com.azure.resourcemanager.security.models.IotSecuritySolutionsAnalyticsRecommendations;
111-
import com.azure.resourcemanager.security.models.IotSensors;
112-
import com.azure.resourcemanager.security.models.IotSites;
11399
import com.azure.resourcemanager.security.models.JitNetworkAccessPolicies;
114100
import com.azure.resourcemanager.security.models.Locations;
115-
import com.azure.resourcemanager.security.models.OnPremiseIotSensors;
101+
import com.azure.resourcemanager.security.models.MdeOnboardings;
116102
import com.azure.resourcemanager.security.models.Operations;
117103
import com.azure.resourcemanager.security.models.Pricings;
118104
import com.azure.resourcemanager.security.models.RegulatoryComplianceAssessments;
@@ -121,6 +107,7 @@
121107
import com.azure.resourcemanager.security.models.SecureScoreControlDefinitions;
122108
import com.azure.resourcemanager.security.models.SecureScoreControls;
123109
import com.azure.resourcemanager.security.models.SecureScores;
110+
import com.azure.resourcemanager.security.models.SecurityConnectors;
124111
import com.azure.resourcemanager.security.models.SecurityContacts;
125112
import com.azure.resourcemanager.security.models.SecuritySolutions;
126113
import com.azure.resourcemanager.security.models.SecuritySolutionsReferenceDatas;
@@ -139,9 +126,16 @@
139126
import java.util.ArrayList;
140127
import java.util.List;
141128
import java.util.Objects;
129+
import java.util.stream.Collectors;
142130

143131
/** Entry point to SecurityManager. API spec for Microsoft.Security (Azure Security Center) resource provider. */
144132
public final class SecurityManager {
133+
private MdeOnboardings mdeOnboardings;
134+
135+
private CustomAssessmentAutomations customAssessmentAutomations;
136+
137+
private CustomEntityStoreAssignments customEntityStoreAssignments;
138+
145139
private ComplianceResults complianceResults;
146140

147141
private Pricings pricings;
@@ -224,28 +218,6 @@ public final class SecurityManager {
224218

225219
private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules;
226220

227-
private IotDefenderSettings iotDefenderSettings;
228-
229-
private IotSensors iotSensors;
230-
231-
private DevicesForSubscriptions devicesForSubscriptions;
232-
233-
private DevicesForHubs devicesForHubs;
234-
235-
private Devices devices;
236-
237-
private OnPremiseIotSensors onPremiseIotSensors;
238-
239-
private IotSites iotSites;
240-
241-
private IotAlerts iotAlerts;
242-
243-
private IotAlertTypes iotAlertTypes;
244-
245-
private IotRecommendations iotRecommendations;
246-
247-
private IotRecommendationTypes iotRecommendationTypes;
248-
249221
private Alerts alerts;
250222

251223
private Settings settings;
@@ -254,6 +226,8 @@ public final class SecurityManager {
254226

255227
private SoftwareInventories softwareInventories;
256228

229+
private SecurityConnectors securityConnectors;
230+
257231
private final SecurityCenter clientObject;
258232

259233
private SecurityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -413,11 +387,24 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
413387
List<HttpPipelinePolicy> policies = new ArrayList<>();
414388
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
415389
policies.add(new RequestIdPolicy());
390+
policies
391+
.addAll(
392+
this
393+
.policies
394+
.stream()
395+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
396+
.collect(Collectors.toList()));
416397
HttpPolicyProviders.addBeforeRetryPolicies(policies);
417398
policies.add(retryPolicy);
418399
policies.add(new AddDatePolicy());
419400
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
420-
policies.addAll(this.policies);
401+
policies
402+
.addAll(
403+
this
404+
.policies
405+
.stream()
406+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
407+
.collect(Collectors.toList()));
421408
HttpPolicyProviders.addAfterRetryPolicies(policies);
422409
policies.add(new HttpLoggingPolicy(httpLogOptions));
423410
HttpPipeline httpPipeline =
@@ -429,6 +416,32 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
429416
}
430417
}
431418

419+
/** @return Resource collection API of MdeOnboardings. */
420+
public MdeOnboardings mdeOnboardings() {
421+
if (this.mdeOnboardings == null) {
422+
this.mdeOnboardings = new MdeOnboardingsImpl(clientObject.getMdeOnboardings(), this);
423+
}
424+
return mdeOnboardings;
425+
}
426+
427+
/** @return Resource collection API of CustomAssessmentAutomations. */
428+
public CustomAssessmentAutomations customAssessmentAutomations() {
429+
if (this.customAssessmentAutomations == null) {
430+
this.customAssessmentAutomations =
431+
new CustomAssessmentAutomationsImpl(clientObject.getCustomAssessmentAutomations(), this);
432+
}
433+
return customAssessmentAutomations;
434+
}
435+
436+
/** @return Resource collection API of CustomEntityStoreAssignments. */
437+
public CustomEntityStoreAssignments customEntityStoreAssignments() {
438+
if (this.customEntityStoreAssignments == null) {
439+
this.customEntityStoreAssignments =
440+
new CustomEntityStoreAssignmentsImpl(clientObject.getCustomEntityStoreAssignments(), this);
441+
}
442+
return customEntityStoreAssignments;
443+
}
444+
432445
/** @return Resource collection API of ComplianceResults. */
433446
public ComplianceResults complianceResults() {
434447
if (this.complianceResults == null) {
@@ -782,96 +795,6 @@ public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselin
782795
return sqlVulnerabilityAssessmentBaselineRules;
783796
}
784797

785-
/** @return Resource collection API of IotDefenderSettings. */
786-
public IotDefenderSettings iotDefenderSettings() {
787-
if (this.iotDefenderSettings == null) {
788-
this.iotDefenderSettings = new IotDefenderSettingsImpl(clientObject.getIotDefenderSettings(), this);
789-
}
790-
return iotDefenderSettings;
791-
}
792-
793-
/** @return Resource collection API of IotSensors. */
794-
public IotSensors iotSensors() {
795-
if (this.iotSensors == null) {
796-
this.iotSensors = new IotSensorsImpl(clientObject.getIotSensors(), this);
797-
}
798-
return iotSensors;
799-
}
800-
801-
/** @return Resource collection API of DevicesForSubscriptions. */
802-
public DevicesForSubscriptions devicesForSubscriptions() {
803-
if (this.devicesForSubscriptions == null) {
804-
this.devicesForSubscriptions =
805-
new DevicesForSubscriptionsImpl(clientObject.getDevicesForSubscriptions(), this);
806-
}
807-
return devicesForSubscriptions;
808-
}
809-
810-
/** @return Resource collection API of DevicesForHubs. */
811-
public DevicesForHubs devicesForHubs() {
812-
if (this.devicesForHubs == null) {
813-
this.devicesForHubs = new DevicesForHubsImpl(clientObject.getDevicesForHubs(), this);
814-
}
815-
return devicesForHubs;
816-
}
817-
818-
/** @return Resource collection API of Devices. */
819-
public Devices devices() {
820-
if (this.devices == null) {
821-
this.devices = new DevicesImpl(clientObject.getDevices(), this);
822-
}
823-
return devices;
824-
}
825-
826-
/** @return Resource collection API of OnPremiseIotSensors. */
827-
public OnPremiseIotSensors onPremiseIotSensors() {
828-
if (this.onPremiseIotSensors == null) {
829-
this.onPremiseIotSensors = new OnPremiseIotSensorsImpl(clientObject.getOnPremiseIotSensors(), this);
830-
}
831-
return onPremiseIotSensors;
832-
}
833-
834-
/** @return Resource collection API of IotSites. */
835-
public IotSites iotSites() {
836-
if (this.iotSites == null) {
837-
this.iotSites = new IotSitesImpl(clientObject.getIotSites(), this);
838-
}
839-
return iotSites;
840-
}
841-
842-
/** @return Resource collection API of IotAlerts. */
843-
public IotAlerts iotAlerts() {
844-
if (this.iotAlerts == null) {
845-
this.iotAlerts = new IotAlertsImpl(clientObject.getIotAlerts(), this);
846-
}
847-
return iotAlerts;
848-
}
849-
850-
/** @return Resource collection API of IotAlertTypes. */
851-
public IotAlertTypes iotAlertTypes() {
852-
if (this.iotAlertTypes == null) {
853-
this.iotAlertTypes = new IotAlertTypesImpl(clientObject.getIotAlertTypes(), this);
854-
}
855-
return iotAlertTypes;
856-
}
857-
858-
/** @return Resource collection API of IotRecommendations. */
859-
public IotRecommendations iotRecommendations() {
860-
if (this.iotRecommendations == null) {
861-
this.iotRecommendations = new IotRecommendationsImpl(clientObject.getIotRecommendations(), this);
862-
}
863-
return iotRecommendations;
864-
}
865-
866-
/** @return Resource collection API of IotRecommendationTypes. */
867-
public IotRecommendationTypes iotRecommendationTypes() {
868-
if (this.iotRecommendationTypes == null) {
869-
this.iotRecommendationTypes =
870-
new IotRecommendationTypesImpl(clientObject.getIotRecommendationTypes(), this);
871-
}
872-
return iotRecommendationTypes;
873-
}
874-
875798
/** @return Resource collection API of Alerts. */
876799
public Alerts alerts() {
877800
if (this.alerts == null) {
@@ -904,6 +827,14 @@ public SoftwareInventories softwareInventories() {
904827
return softwareInventories;
905828
}
906829

830+
/** @return Resource collection API of SecurityConnectors. */
831+
public SecurityConnectors securityConnectors() {
832+
if (this.securityConnectors == null) {
833+
this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this);
834+
}
835+
return securityConnectors;
836+
}
837+
907838
/**
908839
* @return Wrapped service client SecurityCenter providing direct access to the underlying auto-generated API
909840
* implementation, based on Azure REST API.

sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/AdaptiveApplicationControlsClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface AdaptiveApplicationControlsClient {
3232
* @throws IllegalArgumentException thrown if parameters fail the validation.
3333
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
3434
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
35-
* @return a list of application control machine groups for the subscription.
35+
* @return a list of application control machine groups for the subscription along with {@link Response}.
3636
*/
3737
@ServiceMethod(returns = ReturnType.SINGLE)
3838
Response<AdaptiveApplicationControlGroupsInner> listWithResponse(
@@ -62,7 +62,7 @@ Response<AdaptiveApplicationControlGroupsInner> listWithResponse(
6262
* @throws IllegalArgumentException thrown if parameters fail the validation.
6363
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6464
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
65-
* @return an application control VM/server group.
65+
* @return an application control VM/server group along with {@link Response}.
6666
*/
6767
@ServiceMethod(returns = ReturnType.SINGLE)
6868
Response<AdaptiveApplicationControlGroupInner> getWithResponse(
@@ -95,7 +95,7 @@ AdaptiveApplicationControlGroupInner put(
9595
* @throws IllegalArgumentException thrown if parameters fail the validation.
9696
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
9797
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
98-
* @return the response.
98+
* @return the response body along with {@link Response}.
9999
*/
100100
@ServiceMethod(returns = ReturnType.SINGLE)
101101
Response<AdaptiveApplicationControlGroupInner> putWithResponse(
@@ -124,7 +124,7 @@ Response<AdaptiveApplicationControlGroupInner> putWithResponse(
124124
* @throws IllegalArgumentException thrown if parameters fail the validation.
125125
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
126126
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
127-
* @return the response.
127+
* @return the {@link Response}.
128128
*/
129129
@ServiceMethod(returns = ReturnType.SINGLE)
130130
Response<Void> deleteWithResponse(String ascLocation, String groupName, Context context);

0 commit comments

Comments
 (0)