1. Packages
  2. Chronosphere
  3. API Docs
  4. RecordingRule
Chronosphere v0.9.8 published on Thursday, Apr 3, 2025 by Chronosphere

chronosphere.RecordingRule

Explore with Pulumi AI

Create RecordingRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RecordingRule(name: string, args: RecordingRuleArgs, opts?: CustomResourceOptions);
@overload
def RecordingRule(resource_name: str,
                  args: RecordingRuleArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def RecordingRule(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  expr: Optional[str] = None,
                  name: Optional[str] = None,
                  bucket_id: Optional[str] = None,
                  execution_group: Optional[str] = None,
                  interval: Optional[str] = None,
                  labels: Optional[Mapping[str, str]] = None,
                  metric_name: Optional[str] = None,
                  slug: Optional[str] = None)
func NewRecordingRule(ctx *Context, name string, args RecordingRuleArgs, opts ...ResourceOption) (*RecordingRule, error)
public RecordingRule(string name, RecordingRuleArgs args, CustomResourceOptions? opts = null)
public RecordingRule(String name, RecordingRuleArgs args)
public RecordingRule(String name, RecordingRuleArgs args, CustomResourceOptions options)
type: chronosphere:RecordingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RecordingRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RecordingRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RecordingRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RecordingRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RecordingRuleArgs
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 recordingRuleResource = new Pulumi.RecordingRule("recordingRuleResource", new()
{
    Expr = "string",
    Name = "string",
    BucketId = "string",
    ExecutionGroup = "string",
    Interval = "string",
    Labels = 
    {
        { "string", "string" },
    },
    MetricName = "string",
    Slug = "string",
});
Copy
example, err := chronosphere.NewRecordingRule(ctx, "recordingRuleResource", &chronosphere.RecordingRuleArgs{
	Expr:           pulumi.String("string"),
	Name:           pulumi.String("string"),
	BucketId:       pulumi.String("string"),
	ExecutionGroup: pulumi.String("string"),
	Interval:       pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	MetricName: pulumi.String("string"),
	Slug:       pulumi.String("string"),
})
Copy
var recordingRuleResource = new RecordingRule("recordingRuleResource", RecordingRuleArgs.builder()
    .expr("string")
    .name("string")
    .bucketId("string")
    .executionGroup("string")
    .interval("string")
    .labels(Map.of("string", "string"))
    .metricName("string")
    .slug("string")
    .build());
Copy
recording_rule_resource = chronosphere.RecordingRule("recordingRuleResource",
    expr="string",
    name="string",
    bucket_id="string",
    execution_group="string",
    interval="string",
    labels={
        "string": "string",
    },
    metric_name="string",
    slug="string")
Copy
const recordingRuleResource = new chronosphere.RecordingRule("recordingRuleResource", {
    expr: "string",
    name: "string",
    bucketId: "string",
    executionGroup: "string",
    interval: "string",
    labels: {
        string: "string",
    },
    metricName: "string",
    slug: "string",
});
Copy
type: chronosphere:RecordingRule
properties:
    bucketId: string
    executionGroup: string
    expr: string
    interval: string
    labels:
        string: string
    metricName: string
    name: string
    slug: string
Copy

RecordingRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RecordingRule resource accepts the following input properties:

Expr This property is required. string
Name This property is required. string
BucketId string
ExecutionGroup string
Interval string
Labels Dictionary<string, string>
MetricName string
Slug Changes to this property will trigger replacement. string
Expr This property is required. string
Name This property is required. string
BucketId string
ExecutionGroup string
Interval string
Labels map[string]string
MetricName string
Slug Changes to this property will trigger replacement. string
expr This property is required. String
name This property is required. String
bucketId String
executionGroup String
interval String
labels Map<String,String>
metricName String
slug Changes to this property will trigger replacement. String
expr This property is required. string
name This property is required. string
bucketId string
executionGroup string
interval string
labels {[key: string]: string}
metricName string
slug Changes to this property will trigger replacement. string
expr This property is required. str
name This property is required. str
bucket_id str
execution_group str
interval str
labels Mapping[str, str]
metric_name str
slug Changes to this property will trigger replacement. str
expr This property is required. String
name This property is required. String
bucketId String
executionGroup String
interval String
labels Map<String>
metricName String
slug Changes to this property will trigger replacement. String

Outputs

All input properties are implicitly available as output properties. Additionally, the RecordingRule resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing RecordingRule Resource

Get an existing RecordingRule 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?: RecordingRuleState, opts?: CustomResourceOptions): RecordingRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket_id: Optional[str] = None,
        execution_group: Optional[str] = None,
        expr: Optional[str] = None,
        interval: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        metric_name: Optional[str] = None,
        name: Optional[str] = None,
        slug: Optional[str] = None) -> RecordingRule
func GetRecordingRule(ctx *Context, name string, id IDInput, state *RecordingRuleState, opts ...ResourceOption) (*RecordingRule, error)
public static RecordingRule Get(string name, Input<string> id, RecordingRuleState? state, CustomResourceOptions? opts = null)
public static RecordingRule get(String name, Output<String> id, RecordingRuleState state, CustomResourceOptions options)
resources:  _:    type: chronosphere:RecordingRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
BucketId string
ExecutionGroup string
Expr string
Interval string
Labels Dictionary<string, string>
MetricName string
Name string
Slug Changes to this property will trigger replacement. string
BucketId string
ExecutionGroup string
Expr string
Interval string
Labels map[string]string
MetricName string
Name string
Slug Changes to this property will trigger replacement. string
bucketId String
executionGroup String
expr String
interval String
labels Map<String,String>
metricName String
name String
slug Changes to this property will trigger replacement. String
bucketId string
executionGroup string
expr string
interval string
labels {[key: string]: string}
metricName string
name string
slug Changes to this property will trigger replacement. string
bucket_id str
execution_group str
expr str
interval str
labels Mapping[str, str]
metric_name str
name str
slug Changes to this property will trigger replacement. str
bucketId String
executionGroup String
expr String
interval String
labels Map<String>
metricName String
name String
slug Changes to this property will trigger replacement. String

Package Details

Repository
chronosphere chronosphereio/pulumi-chronosphere
License
Apache-2.0
Notes
This Pulumi package is based on the chronosphere Terraform Provider.