Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion sdk/security/azure-resourcemanager-security/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.5 (Unreleased)
## 1.0.0-beta.1 (2023-03-23)

- 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).

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/security/azure-resourcemanager-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-security</artifactId>
<version>1.0.0-beta.4</version>
<version>1.0.0-beta.5</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
12 changes: 6 additions & 6 deletions sdk/security/azure-resourcemanager-security/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4974,7 +4974,7 @@ import java.util.Map;
/** Samples for SecurityConnectors CreateOrUpdate. */
public final class SecurityConnectorsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PutSecurityConnector_example.json
*/
/**
* Sample code: Create or update a security connector.
Expand Down Expand Up @@ -5020,7 +5020,7 @@ public final class SecurityConnectorsCreateOrUpdateSamples {
/** Samples for SecurityConnectors Delete. */
public final class SecurityConnectorsDeleteSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
*/
/**
* Sample code: Delete a security connector.
Expand All @@ -5041,7 +5041,7 @@ public final class SecurityConnectorsDeleteSamples {
/** Samples for SecurityConnectors GetByResourceGroup. */
public final class SecurityConnectorsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorSingleResource_example.json
*/
/**
* Sample code: Retrieve a security connector.
Expand All @@ -5063,7 +5063,7 @@ public final class SecurityConnectorsGetByResourceGroupSamples {
/** Samples for SecurityConnectors List. */
public final class SecurityConnectorsListSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsSubscription_example.json
*/
/**
* Sample code: List all security connectors of a specified subscription.
Expand All @@ -5083,7 +5083,7 @@ public final class SecurityConnectorsListSamples {
/** Samples for SecurityConnectors ListByResourceGroup. */
public final class SecurityConnectorsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/GetSecurityConnectorsResourceGroup_example.json
*/
/**
* Sample code: List all security connectors of a specified resource group.
Expand Down Expand Up @@ -5112,7 +5112,7 @@ import java.util.Map;
/** Samples for SecurityConnectors Update. */
public final class SecurityConnectorsUpdateSamples {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2022-08-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/preview/2023-03-01-preview/examples/SecurityConnectors/PatchSecurityConnector_example.json
*/
/**
* Sample code: Update a security connector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ public final class SecurityManager {

private SoftwareInventories softwareInventories;

private SecurityConnectors securityConnectors;

private GovernanceRules governanceRules;

private GovernanceAssignments governanceAssignments;
Expand Down Expand Up @@ -274,6 +272,8 @@ public final class SecurityManager {

private SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselineRules;

private SecurityConnectors securityConnectors;

private final SecurityCenter clientObject;

private SecurityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand Down Expand Up @@ -439,7 +439,7 @@ public SecurityManager authenticate(TokenCredential credential, AzureProfile pro
.append("-")
.append("com.azure.resourcemanager.security")
.append("/")
.append("1.0.0-beta.4");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -1058,18 +1058,6 @@ public SoftwareInventories softwareInventories() {
return softwareInventories;
}

/**
* Gets the resource collection API of SecurityConnectors. It manages SecurityConnector.
*
* @return Resource collection API of SecurityConnectors.
*/
public SecurityConnectors securityConnectors() {
if (this.securityConnectors == null) {
this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this);
}
return securityConnectors;
}

/**
* Gets the resource collection API of GovernanceRules. It manages GovernanceRule.
*
Expand Down Expand Up @@ -1249,6 +1237,18 @@ public SqlVulnerabilityAssessmentBaselineRules sqlVulnerabilityAssessmentBaselin
return sqlVulnerabilityAssessmentBaselineRules;
}

/**
* Gets the resource collection API of SecurityConnectors. It manages SecurityConnector.
*
* @return Resource collection API of SecurityConnectors.
*/
public SecurityConnectors securityConnectors() {
if (this.securityConnectors == null) {
this.securityConnectors = new SecurityConnectorsImpl(clientObject.getSecurityConnectors(), this);
}
return securityConnectors;
}

/**
* @return Wrapped service client SecurityCenter providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,6 @@ public interface SecurityCenter {
*/
SoftwareInventoriesClient getSoftwareInventories();

/**
* Gets the SecurityConnectorsClient object to access its operations.
*
* @return the SecurityConnectorsClient object.
*/
SecurityConnectorsClient getSecurityConnectors();

/**
* Gets the GovernanceRulesClient object to access its operations.
*
Expand Down Expand Up @@ -456,4 +449,11 @@ public interface SecurityCenter {
* @return the SqlVulnerabilityAssessmentBaselineRulesClient object.
*/
SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessmentBaselineRules();

/**
* Gets the SecurityConnectorsClient object to access its operations.
*
* @return the SecurityConnectorsClient object.
*/
SecurityConnectorsClient getSecurityConnectors();
}
Original file line number Diff line number Diff line change
Expand Up @@ -695,18 +695,6 @@ public SoftwareInventoriesClient getSoftwareInventories() {
return this.softwareInventories;
}

/** The SecurityConnectorsClient object to access its operations. */
private final SecurityConnectorsClient securityConnectors;

/**
* Gets the SecurityConnectorsClient object to access its operations.
*
* @return the SecurityConnectorsClient object.
*/
public SecurityConnectorsClient getSecurityConnectors() {
return this.securityConnectors;
}

/** The GovernanceRulesClient object to access its operations. */
private final GovernanceRulesClient governanceRules;

Expand Down Expand Up @@ -875,6 +863,18 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme
return this.sqlVulnerabilityAssessmentBaselineRules;
}

/** The SecurityConnectorsClient object to access its operations. */
private final SecurityConnectorsClient securityConnectors;

/**
* Gets the SecurityConnectorsClient object to access its operations.
*
* @return the SecurityConnectorsClient object.
*/
public SecurityConnectorsClient getSecurityConnectors() {
return this.securityConnectors;
}

/**
* Initializes an instance of SecurityCenter client.
*
Expand Down Expand Up @@ -944,7 +944,6 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme
this.settings = new SettingsClientImpl(this);
this.ingestionSettings = new IngestionSettingsClientImpl(this);
this.softwareInventories = new SoftwareInventoriesClientImpl(this);
this.securityConnectors = new SecurityConnectorsClientImpl(this);
this.governanceRules = new GovernanceRulesClientImpl(this);
this.governanceAssignments = new GovernanceAssignmentsClientImpl(this);
this.applications = new ApplicationsClientImpl(this);
Expand All @@ -959,6 +958,7 @@ public SqlVulnerabilityAssessmentBaselineRulesClient getSqlVulnerabilityAssessme
this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansClientImpl(this);
this.sqlVulnerabilityAssessmentScanResults = new SqlVulnerabilityAssessmentScanResultsClientImpl(this);
this.sqlVulnerabilityAssessmentBaselineRules = new SqlVulnerabilityAssessmentBaselineRulesClientImpl(this);
this.securityConnectors = new SecurityConnectorsClientImpl(this);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private Mono<PagedResponse<SecurityConnectorInner>> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
Expand Down Expand Up @@ -230,7 +230,7 @@ private Mono<PagedResponse<SecurityConnectorInner>> listSinglePageAsync(Context
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
Expand Down Expand Up @@ -333,7 +333,7 @@ private Mono<PagedResponse<SecurityConnectorInner>> listByResourceGroupSinglePag
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
Expand Down Expand Up @@ -390,7 +390,7 @@ private Mono<PagedResponse<SecurityConnectorInner>> listByResourceGroupSinglePag
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
Expand Down Expand Up @@ -516,7 +516,7 @@ private Mono<Response<SecurityConnectorInner>> getByResourceGroupWithResponseAsy
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
Expand Down Expand Up @@ -568,7 +568,7 @@ private Mono<Response<SecurityConnectorInner>> getByResourceGroupWithResponseAsy
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
Expand Down Expand Up @@ -676,7 +676,7 @@ private Mono<Response<SecurityConnectorInner>> createOrUpdateWithResponseAsync(
} else {
securityConnector.validate();
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
Expand Down Expand Up @@ -740,7 +740,7 @@ private Mono<Response<SecurityConnectorInner>> createOrUpdateWithResponseAsync(
} else {
securityConnector.validate();
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
Expand Down Expand Up @@ -860,7 +860,7 @@ private Mono<Response<SecurityConnectorInner>> updateWithResponseAsync(
} else {
securityConnector.validate();
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
Expand Down Expand Up @@ -923,7 +923,7 @@ private Mono<Response<SecurityConnectorInner>> updateWithResponseAsync(
} else {
securityConnector.validate();
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
Expand Down Expand Up @@ -1030,7 +1030,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
return FluxUtil
.withContext(
Expand Down Expand Up @@ -1082,7 +1082,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter securityConnectorName is required and cannot be null."));
}
final String apiVersion = "2022-08-01-preview";
final String apiVersion = "2023-03-01-preview";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** The aws connector environment data. */
/** The AWS connector environment data. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "environmentType")
@JsonTypeName("AwsAccount")
@Fluent
Expand All @@ -20,6 +21,18 @@ public final class AwsEnvironmentData extends EnvironmentData {
@JsonProperty(value = "organizationalData")
private AwsOrganizationalData organizationalData;

/*
* list of regions to scan
*/
@JsonProperty(value = "regions")
private List<String> regions;

/*
* The AWS account name
*/
@JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY)
private String accountName;

/** Creates an instance of AwsEnvironmentData class. */
public AwsEnvironmentData() {
}
Expand All @@ -44,6 +57,35 @@ public AwsEnvironmentData withOrganizationalData(AwsOrganizationalData organizat
return this;
}

/**
* Get the regions property: list of regions to scan.
*
* @return the regions value.
*/
public List<String> regions() {
return this.regions;
}

/**
* Set the regions property: list of regions to scan.
*
* @param regions the regions value to set.
* @return the AwsEnvironmentData object itself.
*/
public AwsEnvironmentData withRegions(List<String> regions) {
this.regions = regions;
return this;
}

/**
* Get the accountName property: The AWS account name.
*
* @return the accountName value.
*/
public String accountName() {
return this.accountName;
}

/**
* Validates the instance.
*
Expand Down
Loading