newrelic.DataPartitionRule
Explore with Pulumi AI
Use this resource to create, update and delete New Relic Data partition rule.
Additional Information
More details about the data partition can be found here
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.DataPartitionRule("foo", new()
{
Description = "description",
Enabled = true,
Nrql = "logtype='node'",
RetentionPolicy = "STANDARD",
TargetDataPartition = "Log_name",
});
});
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewDataPartitionRule(ctx, "foo", &newrelic.DataPartitionRuleArgs{
Description: pulumi.String("description"),
Enabled: pulumi.Bool(true),
Nrql: pulumi.String("logtype='node'"),
RetentionPolicy: pulumi.String("STANDARD"),
TargetDataPartition: pulumi.String("Log_name"),
})
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.newrelic.DataPartitionRule;
import com.pulumi.newrelic.DataPartitionRuleArgs;
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 foo = new DataPartitionRule("foo", DataPartitionRuleArgs.builder()
.description("description")
.enabled(true)
.nrql("logtype='node'")
.retentionPolicy("STANDARD")
.targetDataPartition("Log_name")
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.DataPartitionRule("foo",
description="description",
enabled=True,
nrql="logtype='node'",
retention_policy="STANDARD",
target_data_partition="Log_name")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.DataPartitionRule("foo", {
description: "description",
enabled: true,
nrql: "logtype='node'",
retentionPolicy: "STANDARD",
targetDataPartition: "Log_name",
});
resources:
foo:
type: newrelic:DataPartitionRule
properties:
description: description
enabled: true
nrql: logtype='node'
retentionPolicy: STANDARD
targetDataPartition: Log_name
Create DataPartitionRule Resource
new DataPartitionRule(name: string, args: DataPartitionRuleArgs, opts?: CustomResourceOptions);
@overload
def DataPartitionRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
nrql: Optional[str] = None,
retention_policy: Optional[str] = None,
target_data_partition: Optional[str] = None)
@overload
def DataPartitionRule(resource_name: str,
args: DataPartitionRuleArgs,
opts: Optional[ResourceOptions] = None)
func NewDataPartitionRule(ctx *Context, name string, args DataPartitionRuleArgs, opts ...ResourceOption) (*DataPartitionRule, error)
public DataPartitionRule(string name, DataPartitionRuleArgs args, CustomResourceOptions? opts = null)
public DataPartitionRule(String name, DataPartitionRuleArgs args)
public DataPartitionRule(String name, DataPartitionRuleArgs args, CustomResourceOptions options)
type: newrelic:DataPartitionRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataPartitionRuleArgs
- 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 DataPartitionRuleArgs
- 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 DataPartitionRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataPartitionRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DataPartitionRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DataPartitionRule 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 DataPartitionRule resource accepts the following input properties:
- Enabled bool
Whether or not this data partition rule is enabled.
- Nrql string
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- Retention
Policy string The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- Target
Data stringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- Account
Id int The account id associated with the data partition rule.
- Description string
The description of the data partition rule.
- Enabled bool
Whether or not this data partition rule is enabled.
- Nrql string
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- Retention
Policy string The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- Target
Data stringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- Account
Id int The account id associated with the data partition rule.
- Description string
The description of the data partition rule.
- enabled Boolean
Whether or not this data partition rule is enabled.
- nrql String
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention
Policy String The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target
Data StringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- account
Id Integer The account id associated with the data partition rule.
- description String
The description of the data partition rule.
- enabled boolean
Whether or not this data partition rule is enabled.
- nrql string
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention
Policy string The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target
Data stringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- account
Id number The account id associated with the data partition rule.
- description string
The description of the data partition rule.
- enabled bool
Whether or not this data partition rule is enabled.
- nrql str
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention_
policy str The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target_
data_ strpartition The name of the data partition where logs will be allocated once the rule is enabled.
- account_
id int The account id associated with the data partition rule.
- description str
The description of the data partition rule.
- enabled Boolean
Whether or not this data partition rule is enabled.
- nrql String
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention
Policy String The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target
Data StringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- account
Id Number The account id associated with the data partition rule.
- description String
The description of the data partition rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataPartitionRule resource produces the following output properties:
- Deleted bool
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- Id string
The provider-assigned unique ID for this managed resource.
- Deleted bool
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- Id string
The provider-assigned unique ID for this managed resource.
- deleted Boolean
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- id String
The provider-assigned unique ID for this managed resource.
- deleted boolean
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- id string
The provider-assigned unique ID for this managed resource.
- deleted Boolean
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing DataPartitionRule Resource
Get an existing DataPartitionRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DataPartitionRuleState, opts?: CustomResourceOptions): DataPartitionRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
deleted: Optional[bool] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
nrql: Optional[str] = None,
retention_policy: Optional[str] = None,
target_data_partition: Optional[str] = None) -> DataPartitionRule
func GetDataPartitionRule(ctx *Context, name string, id IDInput, state *DataPartitionRuleState, opts ...ResourceOption) (*DataPartitionRule, error)
public static DataPartitionRule Get(string name, Input<string> id, DataPartitionRuleState? state, CustomResourceOptions? opts = null)
public static DataPartitionRule get(String name, Output<String> id, DataPartitionRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id int The account id associated with the data partition rule.
- Deleted bool
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- Description string
The description of the data partition rule.
- Enabled bool
Whether or not this data partition rule is enabled.
- Nrql string
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- Retention
Policy string The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- Target
Data stringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- Account
Id int The account id associated with the data partition rule.
- Deleted bool
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- Description string
The description of the data partition rule.
- Enabled bool
Whether or not this data partition rule is enabled.
- Nrql string
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- Retention
Policy string The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- Target
Data stringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- account
Id Integer The account id associated with the data partition rule.
- deleted Boolean
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- description String
The description of the data partition rule.
- enabled Boolean
Whether or not this data partition rule is enabled.
- nrql String
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention
Policy String The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target
Data StringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- account
Id number The account id associated with the data partition rule.
- deleted boolean
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- description string
The description of the data partition rule.
- enabled boolean
Whether or not this data partition rule is enabled.
- nrql string
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention
Policy string The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target
Data stringPartition The name of the data partition where logs will be allocated once the rule is enabled.
- account_
id int The account id associated with the data partition rule.
- deleted bool
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- description str
The description of the data partition rule.
- enabled bool
Whether or not this data partition rule is enabled.
- nrql str
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention_
policy str The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target_
data_ strpartition The name of the data partition where logs will be allocated once the rule is enabled.
- account
Id Number The account id associated with the data partition rule.
- deleted Boolean
Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
- description String
The description of the data partition rule.
- enabled Boolean
Whether or not this data partition rule is enabled.
- nrql String
The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
- retention
Policy String The retention policy of the data partition data. Valid values are
SECONDARY
andSTANDARD
.- target
Data StringPartition The name of the data partition where logs will be allocated once the rule is enabled.
Import
New Relic data partition rule can be imported using the rule ID, e.g. bash
$ pulumi import newrelic:index/dataPartitionRule:DataPartitionRule foo <id>
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
newrelic
Terraform Provider.