Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-resourcemanager-securityinsights] add securityMLAnalyticsSettings to securityInsights #96

Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2022-04-14)

- Azure Resource Manager SecurityInsights client library for Java. This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-05. 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager SecurityInsights client library for Java.

This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-securityinsights</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
643 changes: 438 additions & 205 deletions sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for SecurityInsights Management</name>
<description>This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-01.</description>
<description>This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-05.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
Expand All @@ -38,6 +40,7 @@
import com.azure.resourcemanager.securityinsights.implementation.EntityQueriesImpl;
import com.azure.resourcemanager.securityinsights.implementation.EntityQueryTemplatesImpl;
import com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.FileImportsImpl;
import com.azure.resourcemanager.securityinsights.implementation.IncidentCommentsImpl;
import com.azure.resourcemanager.securityinsights.implementation.IncidentRelationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.IncidentsImpl;
Expand All @@ -47,6 +50,7 @@
import com.azure.resourcemanager.securityinsights.implementation.OperationsImpl;
import com.azure.resourcemanager.securityinsights.implementation.ProductSettingsImpl;
import com.azure.resourcemanager.securityinsights.implementation.SecurityInsightsBuilder;
import com.azure.resourcemanager.securityinsights.implementation.SecurityMLAnalyticsSettingsImpl;
import com.azure.resourcemanager.securityinsights.implementation.SentinelOnboardingStatesImpl;
import com.azure.resourcemanager.securityinsights.implementation.SourceControlsImpl;
import com.azure.resourcemanager.securityinsights.implementation.SourceControlsOperationsImpl;
Expand All @@ -71,6 +75,7 @@
import com.azure.resourcemanager.securityinsights.models.EntityQueries;
import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates;
import com.azure.resourcemanager.securityinsights.models.EntityRelations;
import com.azure.resourcemanager.securityinsights.models.FileImports;
import com.azure.resourcemanager.securityinsights.models.IncidentComments;
import com.azure.resourcemanager.securityinsights.models.IncidentRelations;
import com.azure.resourcemanager.securityinsights.models.Incidents;
Expand All @@ -79,6 +84,7 @@
import com.azure.resourcemanager.securityinsights.models.OfficeConsents;
import com.azure.resourcemanager.securityinsights.models.Operations;
import com.azure.resourcemanager.securityinsights.models.ProductSettings;
import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettings;
import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates;
import com.azure.resourcemanager.securityinsights.models.SourceControls;
import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations;
Expand Down Expand Up @@ -131,6 +137,8 @@ public final class SecurityInsightsManager {

private EntityQueryTemplates entityQueryTemplates;

private FileImports fileImports;

private IncidentComments incidentComments;

private IncidentRelations incidentRelations;
Expand All @@ -141,6 +149,8 @@ public final class SecurityInsightsManager {

private SentinelOnboardingStates sentinelOnboardingStates;

private SecurityMLAnalyticsSettings securityMLAnalyticsSettings;

private ProductSettings productSettings;

private SourceControls sourceControls;
Expand Down Expand Up @@ -190,6 +200,19 @@ public static SecurityInsightsManager authenticate(TokenCredential credential, A
return configure().authenticate(credential, profile);
}

/**
* Creates an instance of SecurityInsights service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the SecurityInsights service API instance.
*/
public static SecurityInsightsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return new SecurityInsightsManager(httpPipeline, profile, null);
}

/**
* Gets a Configurable instance that can be used to create SecurityInsightsManager with optional configuration.
*
Expand All @@ -208,6 +231,7 @@ public static final class Configurable {
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
private final List<String> scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private RetryOptions retryOptions;
private Duration defaultPollInterval;

private Configurable() {
Expand Down Expand Up @@ -268,6 +292,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}

/**
* Sets the retry options for the HTTP pipeline retry policy.
*
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
*/
public Configurable withRetryOptions(RetryOptions retryOptions) {
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
return this;
}

/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
Expand Down Expand Up @@ -301,7 +338,7 @@ public SecurityInsightsManager authenticate(TokenCredential credential, AzurePro
.append("-")
.append("com.azure.resourcemanager.securityinsights")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand All @@ -319,10 +356,15 @@ public SecurityInsightsManager authenticate(TokenCredential credential, AzurePro
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
if (retryOptions != null) {
retryPolicy = new RetryPolicy(retryOptions);
} else {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
Expand Down Expand Up @@ -481,6 +523,14 @@ public EntityQueryTemplates entityQueryTemplates() {
return entityQueryTemplates;
}

/** @return Resource collection API of FileImports. */
public FileImports fileImports() {
if (this.fileImports == null) {
this.fileImports = new FileImportsImpl(clientObject.getFileImports(), this);
}
return fileImports;
}

/** @return Resource collection API of IncidentComments. */
public IncidentComments incidentComments() {
if (this.incidentComments == null) {
Expand Down Expand Up @@ -522,6 +572,15 @@ public SentinelOnboardingStates sentinelOnboardingStates() {
return sentinelOnboardingStates;
}

/** @return Resource collection API of SecurityMLAnalyticsSettings. */
public SecurityMLAnalyticsSettings securityMLAnalyticsSettings() {
if (this.securityMLAnalyticsSettings == null) {
this.securityMLAnalyticsSettings =
new SecurityMLAnalyticsSettingsImpl(clientObject.getSecurityMLAnalyticsSettings(), this);
}
return securityMLAnalyticsSettings;
}

/** @return Resource collection API of ProductSettings. */
public ProductSettings productSettings() {
if (this.productSettings == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner;
import com.azure.resourcemanager.securityinsights.models.Constant74;
import com.azure.resourcemanager.securityinsights.models.Constant81;

/** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */
public interface EntityQueryTemplatesClient {
Expand Down Expand Up @@ -41,7 +41,7 @@ public interface EntityQueryTemplatesClient {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<EntityQueryTemplateInner> list(
String resourceGroupName, String workspaceName, Constant74 kind, Context context);
String resourceGroupName, String workspaceName, Constant81 kind, Context context);

/**
* Gets an entity query.
Expand Down
Loading