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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package com.microsoft.azure.management.policyinsights.v2019_10_01;

import rx.Completable;
import rx.Observable;

/**
Expand Down Expand Up @@ -92,6 +93,25 @@ public interface PolicyStates {
*/
Observable<SummarizeResults> summarizeForResourceAsync(String resourceId);

/**
* Triggers a policy evaluation scan for all the resources under the subscription.
*
* @param subscriptionId Microsoft Azure subscription ID.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable triggerSubscriptionEvaluationAsync(String subscriptionId);

/**
* Triggers a policy evaluation scan for all the resources under the resource group.
*
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Completable triggerResourceGroupEvaluationAsync(String subscriptionId, String resourceGroupName);

/**
* Queries policy states for the subscription level policy set definition.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public interface Remediation extends HasInner<RemediationInner>, Indexable, Upda
/**
* The entirety of the Remediation definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithManagementGroupId, DefinitionStages.WithCreate {
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithMicrosoft.PolicyInsight, DefinitionStages.WithCreate {
}

/**
Expand All @@ -90,19 +90,19 @@ interface DefinitionStages {
/**
* The first stage of a Remediation definition.
*/
interface Blank extends WithManagementGroupId {
interface Blank extends WithMicrosoft.PolicyInsight {
}

/**
* The stage of the remediation definition allowing to specify ManagementGroupId.
* The stage of the remediation definition allowing to specify Microsoft.PolicyInsight.
*/
interface WithManagementGroupId {
interface WithMicrosoft.PolicyInsight {
/**
* Specifies managementGroupId.
* @param managementGroupId Management group ID
* @return the next definition stage
*/
WithCreate withExistingManagementGroupId(String managementGroupId);
WithCreate withExistingMicrosoft.PolicyInsight(String managementGroupId);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.LongRunningFinalState;
import com.microsoft.azure.LongRunningOperationOptions;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.policyinsights.v2019_10_01.PolicyStates;
import rx.Completable;
import rx.functions.Func1;
import rx.Observable;
import com.microsoft.azure.management.policyinsights.v2019_10_01.PolicyStatesQueryResults;
Expand Down Expand Up @@ -125,6 +126,18 @@ public SummarizeResults call(SummarizeResultsInner inner) {
});
}

@Override
public Completable triggerSubscriptionEvaluationAsync(String subscriptionId) {
PolicyStatesInner client = this.inner();
return client.triggerSubscriptionEvaluationAsync(subscriptionId).toCompletable();
}

@Override
public Completable triggerResourceGroupEvaluationAsync(String subscriptionId, String resourceGroupName) {
PolicyStatesInner client = this.inner();
return client.triggerResourceGroupEvaluationAsync(subscriptionId, resourceGroupName).toCompletable();
}

@Override
public Observable<PolicyStatesQueryResults> listQueryResultsForPolicySetDefinitionAsync(PolicyStatesResource policyStatesResource, String subscriptionId, String policySetDefinitionName) {
PolicyStatesInner client = this.inner();
Expand Down
Loading