azure-native.logz.SubAccountTagRule
Explore with Pulumi AI
Capture logs and metrics of Azure resources based on ARM tags. API Version: 2020-10-01.
Example Usage
SubAccountTagRules_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var subAccountTagRule = new AzureNative.Logz.SubAccountTagRule("subAccountTagRule", new()
{
MonitorName = "myMonitor",
ResourceGroupName = "myResourceGroup",
RuleSetName = "default",
SubAccountName = "SubAccount1",
});
});
package main
import (
logz "github.com/pulumi/pulumi-azure-native-sdk/logz"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logz.NewSubAccountTagRule(ctx, "subAccountTagRule", &logz.SubAccountTagRuleArgs{
MonitorName: pulumi.String("myMonitor"),
ResourceGroupName: pulumi.String("myResourceGroup"),
RuleSetName: pulumi.String("default"),
SubAccountName: pulumi.String("SubAccount1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.logz.SubAccountTagRule;
import com.pulumi.azurenative.logz.SubAccountTagRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var subAccountTagRule = new SubAccountTagRule("subAccountTagRule", SubAccountTagRuleArgs.builder()
.monitorName("myMonitor")
.resourceGroupName("myResourceGroup")
.ruleSetName("default")
.subAccountName("SubAccount1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
sub_account_tag_rule = azure_native.logz.SubAccountTagRule("subAccountTagRule",
monitor_name="myMonitor",
resource_group_name="myResourceGroup",
rule_set_name="default",
sub_account_name="SubAccount1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const subAccountTagRule = new azure_native.logz.SubAccountTagRule("subAccountTagRule", {
monitorName: "myMonitor",
resourceGroupName: "myResourceGroup",
ruleSetName: "default",
subAccountName: "SubAccount1",
});
resources:
subAccountTagRule:
type: azure-native:logz:SubAccountTagRule
properties:
monitorName: myMonitor
resourceGroupName: myResourceGroup
ruleSetName: default
subAccountName: SubAccount1
Create SubAccountTagRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubAccountTagRule(name: string, args: SubAccountTagRuleArgs, opts?: CustomResourceOptions);
@overload
def SubAccountTagRule(resource_name: str,
args: SubAccountTagRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SubAccountTagRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
monitor_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
sub_account_name: Optional[str] = None,
properties: Optional[MonitoringTagRulesPropertiesArgs] = None,
rule_set_name: Optional[str] = None)
func NewSubAccountTagRule(ctx *Context, name string, args SubAccountTagRuleArgs, opts ...ResourceOption) (*SubAccountTagRule, error)
public SubAccountTagRule(string name, SubAccountTagRuleArgs args, CustomResourceOptions? opts = null)
public SubAccountTagRule(String name, SubAccountTagRuleArgs args)
public SubAccountTagRule(String name, SubAccountTagRuleArgs args, CustomResourceOptions options)
type: azure-native:logz:SubAccountTagRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SubAccountTagRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SubAccountTagRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubAccountTagRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubAccountTagRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubAccountTagRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var subAccountTagRuleResource = new AzureNative.Logz.SubAccountTagRule("subAccountTagRuleResource", new()
{
MonitorName = "string",
ResourceGroupName = "string",
SubAccountName = "string",
Properties =
{
{ "logRules",
{
{ "filteringTags", new[]
{
{
{ "action", "string" },
{ "name", "string" },
{ "value", "string" },
},
} },
{ "sendAadLogs", false },
{ "sendActivityLogs", false },
{ "sendSubscriptionLogs", false },
} },
},
RuleSetName = "string",
});
example, err := logz.NewSubAccountTagRule(ctx, "subAccountTagRuleResource", &logz.SubAccountTagRuleArgs{
MonitorName: "string",
ResourceGroupName: "string",
SubAccountName: "string",
Properties: map[string]interface{}{
"logRules": map[string]interface{}{
"filteringTags": []map[string]interface{}{
map[string]interface{}{
"action": "string",
"name": "string",
"value": "string",
},
},
"sendAadLogs": false,
"sendActivityLogs": false,
"sendSubscriptionLogs": false,
},
},
RuleSetName: "string",
})
var subAccountTagRuleResource = new SubAccountTagRule("subAccountTagRuleResource", SubAccountTagRuleArgs.builder()
.monitorName("string")
.resourceGroupName("string")
.subAccountName("string")
.properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.ruleSetName("string")
.build());
sub_account_tag_rule_resource = azure_native.logz.SubAccountTagRule("subAccountTagRuleResource",
monitor_name=string,
resource_group_name=string,
sub_account_name=string,
properties={
logRules: {
filteringTags: [{
action: string,
name: string,
value: string,
}],
sendAadLogs: False,
sendActivityLogs: False,
sendSubscriptionLogs: False,
},
},
rule_set_name=string)
const subAccountTagRuleResource = new azure_native.logz.SubAccountTagRule("subAccountTagRuleResource", {
monitorName: "string",
resourceGroupName: "string",
subAccountName: "string",
properties: {
logRules: {
filteringTags: [{
action: "string",
name: "string",
value: "string",
}],
sendAadLogs: false,
sendActivityLogs: false,
sendSubscriptionLogs: false,
},
},
ruleSetName: "string",
});
type: azure-native:logz:SubAccountTagRule
properties:
monitorName: string
properties:
logRules:
filteringTags:
- action: string
name: string
value: string
sendAadLogs: false
sendActivityLogs: false
sendSubscriptionLogs: false
resourceGroupName: string
ruleSetName: string
subAccountName: string
SubAccountTagRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SubAccountTagRule resource accepts the following input properties:
- Monitor
Name string - Monitor resource name
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Sub
Account stringName - Sub Account resource name
- Properties
Pulumi.
Azure Native. Logz. Inputs. Monitoring Tag Rules Properties - Definition of the properties for a TagRules resource.
- Rule
Set stringName
- Monitor
Name string - Monitor resource name
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Sub
Account stringName - Sub Account resource name
- Properties
Monitoring
Tag Rules Properties Args - Definition of the properties for a TagRules resource.
- Rule
Set stringName
- monitor
Name String - Monitor resource name
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- sub
Account StringName - Sub Account resource name
- properties
Monitoring
Tag Rules Properties - Definition of the properties for a TagRules resource.
- rule
Set StringName
- monitor
Name string - Monitor resource name
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- sub
Account stringName - Sub Account resource name
- properties
Monitoring
Tag Rules Properties - Definition of the properties for a TagRules resource.
- rule
Set stringName
- monitor_
name str - Monitor resource name
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- sub_
account_ strname - Sub Account resource name
- properties
Monitoring
Tag Rules Properties Args - Definition of the properties for a TagRules resource.
- rule_
set_ strname
- monitor
Name String - Monitor resource name
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- sub
Account StringName - Sub Account resource name
- properties Property Map
- Definition of the properties for a TagRules resource.
- rule
Set StringName
Outputs
All input properties are implicitly available as output properties. Additionally, the SubAccountTagRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the rule set.
- System
Data Pulumi.Azure Native. Logz. Outputs. System Data Response - The system metadata relating to this resource
- Type string
- The type of the rule set.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the rule set.
- System
Data SystemData Response - The system metadata relating to this resource
- Type string
- The type of the rule set.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the rule set.
- system
Data SystemData Response - The system metadata relating to this resource
- type String
- The type of the rule set.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the rule set.
- system
Data SystemData Response - The system metadata relating to this resource
- type string
- The type of the rule set.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Name of the rule set.
- system_
data SystemData Response - The system metadata relating to this resource
- type str
- The type of the rule set.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the rule set.
- system
Data Property Map - The system metadata relating to this resource
- type String
- The type of the rule set.
Supporting Types
FilteringTag, FilteringTagArgs
- Action
string | Pulumi.
Azure Native. Logz. Tag Action - Valid actions for a filtering tag. Exclusion takes priority over inclusion.
- Name string
- The name (also known as the key) of the tag.
- Value string
- The value of the tag.
- action String | "Include" | "Exclude"
- Valid actions for a filtering tag. Exclusion takes priority over inclusion.
- name String
- The name (also known as the key) of the tag.
- value String
- The value of the tag.
FilteringTagResponse, FilteringTagResponseArgs
LogRules, LogRulesArgs
- List<Pulumi.
Azure Native. Logz. Inputs. Filtering Tag> - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- Send
Aad boolLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- Send
Activity boolLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- Send
Subscription boolLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- []Filtering
Tag - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- Send
Aad boolLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- Send
Activity boolLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- Send
Subscription boolLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- List<Filtering
Tag> - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send
Aad BooleanLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send
Activity BooleanLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send
Subscription BooleanLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- Filtering
Tag[] - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send
Aad booleanLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send
Activity booleanLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send
Subscription booleanLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- Sequence[Filtering
Tag] - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send_
aad_ boollogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send_
activity_ boollogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send_
subscription_ boollogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- List<Property Map>
- List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send
Aad BooleanLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send
Activity BooleanLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send
Subscription BooleanLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
LogRulesResponse, LogRulesResponseArgs
- List<Pulumi.
Azure Native. Logz. Inputs. Filtering Tag Response> - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- Send
Aad boolLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- Send
Activity boolLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- Send
Subscription boolLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- []Filtering
Tag Response - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- Send
Aad boolLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- Send
Activity boolLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- Send
Subscription boolLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- List<Filtering
Tag Response> - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send
Aad BooleanLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send
Activity BooleanLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send
Subscription BooleanLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- Filtering
Tag Response[] - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send
Aad booleanLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send
Activity booleanLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send
Subscription booleanLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- Sequence[Filtering
Tag Response] - List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send_
aad_ boollogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send_
activity_ boollogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send_
subscription_ boollogs - Flag specifying if subscription logs should be sent for the Monitor resource.
- List<Property Map>
- List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- send
Aad BooleanLogs - Flag specifying if AAD logs should be sent for the Monitor resource.
- send
Activity BooleanLogs - Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- send
Subscription BooleanLogs - Flag specifying if subscription logs should be sent for the Monitor resource.
MonitoringTagRulesProperties, MonitoringTagRulesPropertiesArgs
- Log
Rules Pulumi.Azure Native. Logz. Inputs. Log Rules - Set of rules for sending logs for the Monitor resource.
- log
Rules Property Map - Set of rules for sending logs for the Monitor resource.
MonitoringTagRulesPropertiesResponse, MonitoringTagRulesPropertiesResponseArgs
- Provisioning
State string - Flag specifying if the resource provisioning state as tracked by ARM.
- System
Data Pulumi.Azure Native. Logz. Inputs. System Data Response - Metadata pertaining to creation and last modification of the resource.
- Log
Rules Pulumi.Azure Native. Logz. Inputs. Log Rules Response - Set of rules for sending logs for the Monitor resource.
- Provisioning
State string - Flag specifying if the resource provisioning state as tracked by ARM.
- System
Data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- Log
Rules LogRules Response - Set of rules for sending logs for the Monitor resource.
- provisioning
State String - Flag specifying if the resource provisioning state as tracked by ARM.
- system
Data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- log
Rules LogRules Response - Set of rules for sending logs for the Monitor resource.
- provisioning
State string - Flag specifying if the resource provisioning state as tracked by ARM.
- system
Data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- log
Rules LogRules Response - Set of rules for sending logs for the Monitor resource.
- provisioning_
state str - Flag specifying if the resource provisioning state as tracked by ARM.
- system_
data SystemData Response - Metadata pertaining to creation and last modification of the resource.
- log_
rules LogRules Response - Set of rules for sending logs for the Monitor resource.
- provisioning
State String - Flag specifying if the resource provisioning state as tracked by ARM.
- system
Data Property Map - Metadata pertaining to creation and last modification of the resource.
- log
Rules Property Map - Set of rules for sending logs for the Monitor resource.
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
TagAction, TagActionArgs
- Include
- Include
- Exclude
- Exclude
- Tag
Action Include - Include
- Tag
Action Exclude - Exclude
- Include
- Include
- Exclude
- Exclude
- Include
- Include
- Exclude
- Exclude
- INCLUDE
- Include
- EXCLUDE
- Exclude
- "Include"
- Include
- "Exclude"
- Exclude
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:logz:SubAccountTagRule default /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/accounts/SubAccount1/tagRules/default
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0