1. Packages
  2. Azure Native v2
  3. API Docs
  4. security
  5. getGovernanceRule
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.security.getGovernanceRule

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Get a specific governance rule for the requested scope by ruleId Azure REST API version: 2022-01-01-preview.

Using getGovernanceRule

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getGovernanceRule(args: GetGovernanceRuleArgs, opts?: InvokeOptions): Promise<GetGovernanceRuleResult>
function getGovernanceRuleOutput(args: GetGovernanceRuleOutputArgs, opts?: InvokeOptions): Output<GetGovernanceRuleResult>
Copy
def get_governance_rule(rule_id: Optional[str] = None,
                        scope: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetGovernanceRuleResult
def get_governance_rule_output(rule_id: Optional[pulumi.Input[str]] = None,
                        scope: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetGovernanceRuleResult]
Copy
func LookupGovernanceRule(ctx *Context, args *LookupGovernanceRuleArgs, opts ...InvokeOption) (*LookupGovernanceRuleResult, error)
func LookupGovernanceRuleOutput(ctx *Context, args *LookupGovernanceRuleOutputArgs, opts ...InvokeOption) LookupGovernanceRuleResultOutput
Copy

> Note: This function is named LookupGovernanceRule in the Go SDK.

public static class GetGovernanceRule 
{
    public static Task<GetGovernanceRuleResult> InvokeAsync(GetGovernanceRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetGovernanceRuleResult> Invoke(GetGovernanceRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGovernanceRuleResult> getGovernanceRule(GetGovernanceRuleArgs args, InvokeOptions options)
public static Output<GetGovernanceRuleResult> getGovernanceRule(GetGovernanceRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:security:getGovernanceRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

RuleId
This property is required.
Changes to this property will trigger replacement.
string
The governance rule key - unique key for the standard governance rule (GUID)
Scope
This property is required.
Changes to this property will trigger replacement.
string
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
This property is required.
Changes to this property will trigger replacement.
string
The governance rule key - unique key for the standard governance rule (GUID)
Scope
This property is required.
Changes to this property will trigger replacement.
string
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
This property is required.
Changes to this property will trigger replacement.
String
The governance rule key - unique key for the standard governance rule (GUID)
scope
This property is required.
Changes to this property will trigger replacement.
String
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
This property is required.
Changes to this property will trigger replacement.
string
The governance rule key - unique key for the standard governance rule (GUID)
scope
This property is required.
Changes to this property will trigger replacement.
string
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})'
rule_id
This property is required.
Changes to this property will trigger replacement.
str
The governance rule key - unique key for the standard governance rule (GUID)
scope
This property is required.
Changes to this property will trigger replacement.
str
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
This property is required.
Changes to this property will trigger replacement.
String
The governance rule key - unique key for the standard governance rule (GUID)
scope
This property is required.
Changes to this property will trigger replacement.
String
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})'

getGovernanceRule Result

The following output properties are available:

DisplayName string
Display name of the governance rule
Id string
Resource Id
Name string
Resource name
OwnerSource Pulumi.AzureNative.Security.Outputs.GovernanceRuleOwnerSourceResponse
The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
RulePriority int
The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed
RuleType string
The rule type of the governance rule, defines the source of the rule e.g. Integrated
SourceResourceType string
The governance rule source, what the rule affects, e.g. Assessments
TenantId string
The tenantId (GUID)
Type string
Resource type
Description string
Description of the governance rule
ExcludedScopes List<string>
Excluded scopes, filter out the descendants of the scope (on management scopes)
GovernanceEmailNotification Pulumi.AzureNative.Security.Outputs.GovernanceRuleEmailNotificationResponse
The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
IncludeMemberScopes bool
Defines whether the rule is management scope rule (master connector as a single scope or management scope)
IsDisabled bool
Defines whether the rule is active/inactive
IsGracePeriod bool
Defines whether there is a grace period on the governance rule
Metadata Pulumi.AzureNative.Security.Outputs.GovernanceRuleMetadataResponse
The governance rule metadata
RemediationTimeframe string
Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days
DisplayName string
Display name of the governance rule
Id string
Resource Id
Name string
Resource name
OwnerSource GovernanceRuleOwnerSourceResponse
The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
RulePriority int
The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed
RuleType string
The rule type of the governance rule, defines the source of the rule e.g. Integrated
SourceResourceType string
The governance rule source, what the rule affects, e.g. Assessments
TenantId string
The tenantId (GUID)
Type string
Resource type
Description string
Description of the governance rule
ExcludedScopes []string
Excluded scopes, filter out the descendants of the scope (on management scopes)
GovernanceEmailNotification GovernanceRuleEmailNotificationResponse
The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
IncludeMemberScopes bool
Defines whether the rule is management scope rule (master connector as a single scope or management scope)
IsDisabled bool
Defines whether the rule is active/inactive
IsGracePeriod bool
Defines whether there is a grace period on the governance rule
Metadata GovernanceRuleMetadataResponse
The governance rule metadata
RemediationTimeframe string
Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days
displayName String
Display name of the governance rule
id String
Resource Id
name String
Resource name
ownerSource GovernanceRuleOwnerSourceResponse
The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
rulePriority Integer
The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed
ruleType String
The rule type of the governance rule, defines the source of the rule e.g. Integrated
sourceResourceType String
The governance rule source, what the rule affects, e.g. Assessments
tenantId String
The tenantId (GUID)
type String
Resource type
description String
Description of the governance rule
excludedScopes List<String>
Excluded scopes, filter out the descendants of the scope (on management scopes)
governanceEmailNotification GovernanceRuleEmailNotificationResponse
The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
includeMemberScopes Boolean
Defines whether the rule is management scope rule (master connector as a single scope or management scope)
isDisabled Boolean
Defines whether the rule is active/inactive
isGracePeriod Boolean
Defines whether there is a grace period on the governance rule
metadata GovernanceRuleMetadataResponse
The governance rule metadata
remediationTimeframe String
Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days
displayName string
Display name of the governance rule
id string
Resource Id
name string
Resource name
ownerSource GovernanceRuleOwnerSourceResponse
The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
rulePriority number
The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed
ruleType string
The rule type of the governance rule, defines the source of the rule e.g. Integrated
sourceResourceType string
The governance rule source, what the rule affects, e.g. Assessments
tenantId string
The tenantId (GUID)
type string
Resource type
description string
Description of the governance rule
excludedScopes string[]
Excluded scopes, filter out the descendants of the scope (on management scopes)
governanceEmailNotification GovernanceRuleEmailNotificationResponse
The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
includeMemberScopes boolean
Defines whether the rule is management scope rule (master connector as a single scope or management scope)
isDisabled boolean
Defines whether the rule is active/inactive
isGracePeriod boolean
Defines whether there is a grace period on the governance rule
metadata GovernanceRuleMetadataResponse
The governance rule metadata
remediationTimeframe string
Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days
display_name str
Display name of the governance rule
id str
Resource Id
name str
Resource name
owner_source GovernanceRuleOwnerSourceResponse
The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
rule_priority int
The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed
rule_type str
The rule type of the governance rule, defines the source of the rule e.g. Integrated
source_resource_type str
The governance rule source, what the rule affects, e.g. Assessments
tenant_id str
The tenantId (GUID)
type str
Resource type
description str
Description of the governance rule
excluded_scopes Sequence[str]
Excluded scopes, filter out the descendants of the scope (on management scopes)
governance_email_notification GovernanceRuleEmailNotificationResponse
The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
include_member_scopes bool
Defines whether the rule is management scope rule (master connector as a single scope or management scope)
is_disabled bool
Defines whether the rule is active/inactive
is_grace_period bool
Defines whether there is a grace period on the governance rule
metadata GovernanceRuleMetadataResponse
The governance rule metadata
remediation_timeframe str
Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days
displayName String
Display name of the governance rule
id String
Resource Id
name String
Resource name
ownerSource Property Map
The owner source for the governance rule - e.g. Manually by user@contoso.com - see example
rulePriority Number
The governance rule priority, priority to the lower number. Rules with the same priority on the same scope will not be allowed
ruleType String
The rule type of the governance rule, defines the source of the rule e.g. Integrated
sourceResourceType String
The governance rule source, what the rule affects, e.g. Assessments
tenantId String
The tenantId (GUID)
type String
Resource type
description String
Description of the governance rule
excludedScopes List<String>
Excluded scopes, filter out the descendants of the scope (on management scopes)
governanceEmailNotification Property Map
The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
includeMemberScopes Boolean
Defines whether the rule is management scope rule (master connector as a single scope or management scope)
isDisabled Boolean
Defines whether the rule is active/inactive
isGracePeriod Boolean
Defines whether there is a grace period on the governance rule
metadata Property Map
The governance rule metadata
remediationTimeframe String
Governance rule remediation timeframe - this is the time that will affect on the grace-period duration e.g. 7.00:00:00 - means 7 days

Supporting Types

GovernanceRuleEmailNotificationResponse

DisableManagerEmailNotification bool
Defines whether manager email notifications are disabled
DisableOwnerEmailNotification bool
Defines whether owner email notifications are disabled
DisableManagerEmailNotification bool
Defines whether manager email notifications are disabled
DisableOwnerEmailNotification bool
Defines whether owner email notifications are disabled
disableManagerEmailNotification Boolean
Defines whether manager email notifications are disabled
disableOwnerEmailNotification Boolean
Defines whether owner email notifications are disabled
disableManagerEmailNotification boolean
Defines whether manager email notifications are disabled
disableOwnerEmailNotification boolean
Defines whether owner email notifications are disabled
disable_manager_email_notification bool
Defines whether manager email notifications are disabled
disable_owner_email_notification bool
Defines whether owner email notifications are disabled
disableManagerEmailNotification Boolean
Defines whether manager email notifications are disabled
disableOwnerEmailNotification Boolean
Defines whether owner email notifications are disabled

GovernanceRuleMetadataResponse

CreatedBy This property is required. string
Governance rule Created by object id (GUID)
CreatedOn This property is required. string
Governance rule creation date
UpdatedBy This property is required. string
Governance rule last updated by object id (GUID)
UpdatedOn This property is required. string
Governance rule last update date
CreatedBy This property is required. string
Governance rule Created by object id (GUID)
CreatedOn This property is required. string
Governance rule creation date
UpdatedBy This property is required. string
Governance rule last updated by object id (GUID)
UpdatedOn This property is required. string
Governance rule last update date
createdBy This property is required. String
Governance rule Created by object id (GUID)
createdOn This property is required. String
Governance rule creation date
updatedBy This property is required. String
Governance rule last updated by object id (GUID)
updatedOn This property is required. String
Governance rule last update date
createdBy This property is required. string
Governance rule Created by object id (GUID)
createdOn This property is required. string
Governance rule creation date
updatedBy This property is required. string
Governance rule last updated by object id (GUID)
updatedOn This property is required. string
Governance rule last update date
created_by This property is required. str
Governance rule Created by object id (GUID)
created_on This property is required. str
Governance rule creation date
updated_by This property is required. str
Governance rule last updated by object id (GUID)
updated_on This property is required. str
Governance rule last update date
createdBy This property is required. String
Governance rule Created by object id (GUID)
createdOn This property is required. String
Governance rule creation date
updatedBy This property is required. String
Governance rule last updated by object id (GUID)
updatedOn This property is required. String
Governance rule last update date

GovernanceRuleOwnerSourceResponse

Type string
The owner type for the governance rule owner source
Value string
The source value e.g. tag key like owner name or email address
Type string
The owner type for the governance rule owner source
Value string
The source value e.g. tag key like owner name or email address
type String
The owner type for the governance rule owner source
value String
The source value e.g. tag key like owner name or email address
type string
The owner type for the governance rule owner source
value string
The source value e.g. tag key like owner name or email address
type str
The owner type for the governance rule owner source
value str
The source value e.g. tag key like owner name or email address
type String
The owner type for the governance rule owner source
value String
The source value e.g. tag key like owner name or email address

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi