GovernanceRules Interface

public interface GovernanceRules

Resource collection API of GovernanceRules.

Method Summary

Modifier and Type Method and Description
abstract Blank define(String name)

Begins definition for a new GovernanceRule resource.

abstract void delete(String scope, String ruleId, Context context)

Delete a Governance rule over a given scope.

abstract void deleteById(String id)

Delete a Governance rule over a given scope.

abstract void deleteByIdWithResponse(String id, Context context)

Delete a Governance rule over a given scope.

abstract void deleteByResourceGroup(String scope, String ruleId)

Delete a Governance rule over a given scope.

abstract void execute(String scope, String ruleId)

Execute a governance rule.

abstract void execute(String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context)

Execute a governance rule.

abstract GovernanceRule get(String scope, String ruleId)

Get a specific governance rule for the requested scope by ruleId.

abstract GovernanceRule getById(String id)

Get a specific governance rule for the requested scope by ruleId.

abstract Response<GovernanceRule> getByIdWithResponse(String id, Context context)

Get a specific governance rule for the requested scope by ruleId.

abstract Response<GovernanceRule> getWithResponse(String scope, String ruleId, Context context)

Get a specific governance rule for the requested scope by ruleId.

abstract PagedIterable<GovernanceRule> list(String scope)

Get a list of all relevant governance rules over a scope.

abstract PagedIterable<GovernanceRule> list(String scope, Context context)

Get a list of all relevant governance rules over a scope.

abstract OperationResultAutoGenerated operationResults(String scope, String ruleId, String operationId)

Get governance rules long run operation result for the requested scope by ruleId and operationId.

abstract Response<OperationResultAutoGenerated> operationResultsWithResponse(String scope, String ruleId, String operationId, Context context)

Get governance rules long run operation result for the requested scope by ruleId and operationId.

Method Details

define

public abstract GovernanceRule.DefinitionStages.Blank define(String name)

Begins definition for a new GovernanceRule resource.

Parameters:

name - resource name.

Returns:

the first stage of the new GovernanceRule definition.

delete

public abstract void delete(String scope, String ruleId, Context context)

Delete a Governance rule over a given scope.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).
context - The context to associate with this operation.

deleteById

public abstract void deleteById(String id)

Delete a Governance rule over a given scope.

Parameters:

id - the resource ID.

deleteByIdWithResponse

public abstract void deleteByIdWithResponse(String id, Context context)

Delete a Governance rule over a given scope.

Parameters:

id - the resource ID.
context - The context to associate with this operation.

deleteByResourceGroup

public abstract void deleteByResourceGroup(String scope, String ruleId)

Delete a Governance rule over a given scope.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).

execute

public abstract void execute(String scope, String ruleId)

Execute a governance rule.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).

execute

public abstract void execute(String scope, String ruleId, ExecuteGovernanceRuleParams executeGovernanceRuleParams, Context context)

Execute a governance rule.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).
executeGovernanceRuleParams - Execute governance rule over a given scope.
context - The context to associate with this operation.

get

public abstract GovernanceRule get(String scope, String ruleId)

Get a specific governance rule for the requested scope by ruleId.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).

Returns:

a specific governance rule for the requested scope by ruleId.

getById

public abstract GovernanceRule getById(String id)

Get a specific governance rule for the requested scope by ruleId.

Parameters:

id - the resource ID.

Returns:

a specific governance rule for the requested scope by ruleId along with Response<T>.

getByIdWithResponse

public abstract Response getByIdWithResponse(String id, Context context)

Get a specific governance rule for the requested scope by ruleId.

Parameters:

id - the resource ID.
context - The context to associate with this operation.

Returns:

a specific governance rule for the requested scope by ruleId along with Response<T>.

getWithResponse

public abstract Response getWithResponse(String scope, String ruleId, Context context)

Get a specific governance rule for the requested scope by ruleId.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).
context - The context to associate with this operation.

Returns:

a specific governance rule for the requested scope by ruleId along with Response<T>.

list

public abstract PagedIterable list(String scope)

Get a list of all relevant governance rules over a scope.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.

Returns:

a list of all relevant governance rules over a scope as paginated response with PagedIterable<T>.

list

public abstract PagedIterable list(String scope, Context context)

Get a list of all relevant governance rules over a scope.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
context - The context to associate with this operation.

Returns:

a list of all relevant governance rules over a scope as paginated response with PagedIterable<T>.

operationResults

public abstract OperationResultAutoGenerated operationResults(String scope, String ruleId, String operationId)

Get governance rules long run operation result for the requested scope by ruleId and operationId.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).
operationId - The governance rule long running operation unique key.

Returns:

governance rules long run operation result for the requested scope by ruleId and operationId.

operationResultsWithResponse

public abstract Response operationResultsWithResponse(String scope, String ruleId, String operationId, Context context)

Get governance rules long run operation result for the requested scope by ruleId and operationId.

Parameters:

scope - The scope of the Governance rules. Valid scopes are: management group (format: 'providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: 'subscriptions/{subscriptionId}'), or security connector (format: 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'.
ruleId - The governance rule key - unique key for the standard governance rule (GUID).
operationId - The governance rule long running operation unique key.
context - The context to associate with this operation.

Returns:

governance rules long run operation result for the requested scope by ruleId and operationId.

Applies to