chronosphere.DerivedMetric
Explore with Pulumi AI
Create DerivedMetric Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DerivedMetric(name: string, args: DerivedMetricArgs, opts?: CustomResourceOptions);
@overload
def DerivedMetric(resource_name: str,
args: DerivedMetricArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DerivedMetric(resource_name: str,
opts: Optional[ResourceOptions] = None,
metric_name: Optional[str] = None,
name: Optional[str] = None,
queries: Optional[Sequence[DerivedMetricQueryArgs]] = None,
description: Optional[str] = None,
slug: Optional[str] = None)
func NewDerivedMetric(ctx *Context, name string, args DerivedMetricArgs, opts ...ResourceOption) (*DerivedMetric, error)
public DerivedMetric(string name, DerivedMetricArgs args, CustomResourceOptions? opts = null)
public DerivedMetric(String name, DerivedMetricArgs args)
public DerivedMetric(String name, DerivedMetricArgs args, CustomResourceOptions options)
type: chronosphere:DerivedMetric
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 DerivedMetricArgs
- 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 DerivedMetricArgs
- 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 DerivedMetricArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DerivedMetricArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DerivedMetricArgs
- 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 derivedMetricResource = new Pulumi.DerivedMetric("derivedMetricResource", new()
{
MetricName = "string",
Name = "string",
Queries = new[]
{
new Pulumi.Inputs.DerivedMetricQueryArgs
{
Query = new Pulumi.Inputs.DerivedMetricQueryQueryArgs
{
Expr = "string",
Variables = new[]
{
new Pulumi.Inputs.DerivedMetricQueryQueryVariableArgs
{
DefaultSelector = "string",
Name = "string",
},
},
},
Selector = new Pulumi.Inputs.DerivedMetricQuerySelectorArgs
{
Labels =
{
{ "string", "string" },
},
},
},
},
Description = "string",
Slug = "string",
});
example, err := chronosphere.NewDerivedMetric(ctx, "derivedMetricResource", &chronosphere.DerivedMetricArgs{
MetricName: pulumi.String("string"),
Name: pulumi.String("string"),
Queries: chronosphere.DerivedMetricQueryArray{
&chronosphere.DerivedMetricQueryArgs{
Query: &chronosphere.DerivedMetricQueryQueryArgs{
Expr: pulumi.String("string"),
Variables: chronosphere.DerivedMetricQueryQueryVariableArray{
&chronosphere.DerivedMetricQueryQueryVariableArgs{
DefaultSelector: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
},
Selector: &chronosphere.DerivedMetricQuerySelectorArgs{
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
},
Description: pulumi.String("string"),
Slug: pulumi.String("string"),
})
var derivedMetricResource = new DerivedMetric("derivedMetricResource", DerivedMetricArgs.builder()
.metricName("string")
.name("string")
.queries(DerivedMetricQueryArgs.builder()
.query(DerivedMetricQueryQueryArgs.builder()
.expr("string")
.variables(DerivedMetricQueryQueryVariableArgs.builder()
.defaultSelector("string")
.name("string")
.build())
.build())
.selector(DerivedMetricQuerySelectorArgs.builder()
.labels(Map.of("string", "string"))
.build())
.build())
.description("string")
.slug("string")
.build());
derived_metric_resource = chronosphere.DerivedMetric("derivedMetricResource",
metric_name="string",
name="string",
queries=[{
"query": {
"expr": "string",
"variables": [{
"default_selector": "string",
"name": "string",
}],
},
"selector": {
"labels": {
"string": "string",
},
},
}],
description="string",
slug="string")
const derivedMetricResource = new chronosphere.DerivedMetric("derivedMetricResource", {
metricName: "string",
name: "string",
queries: [{
query: {
expr: "string",
variables: [{
defaultSelector: "string",
name: "string",
}],
},
selector: {
labels: {
string: "string",
},
},
}],
description: "string",
slug: "string",
});
type: chronosphere:DerivedMetric
properties:
description: string
metricName: string
name: string
queries:
- query:
expr: string
variables:
- defaultSelector: string
name: string
selector:
labels:
string: string
slug: string
DerivedMetric 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 DerivedMetric resource accepts the following input properties:
- Metric
Name string - Name string
- Queries
List<Chronosphere.
Pulumi. Inputs. Derived Metric Query> - Description string
- Slug string
- Metric
Name string - Name string
- Queries
[]Derived
Metric Query Args - Description string
- Slug string
- metric
Name String - name String
- queries
List<Derived
Metric Query> - description String
- slug String
- metric
Name string - name string
- queries
Derived
Metric Query[] - description string
- slug string
- metric
Name String - name String
- queries List<Property Map>
- description String
- slug String
Outputs
All input properties are implicitly available as output properties. Additionally, the DerivedMetric 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 DerivedMetric Resource
Get an existing DerivedMetric 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?: DerivedMetricState, opts?: CustomResourceOptions): DerivedMetric
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
metric_name: Optional[str] = None,
name: Optional[str] = None,
queries: Optional[Sequence[DerivedMetricQueryArgs]] = None,
slug: Optional[str] = None) -> DerivedMetric
func GetDerivedMetric(ctx *Context, name string, id IDInput, state *DerivedMetricState, opts ...ResourceOption) (*DerivedMetric, error)
public static DerivedMetric Get(string name, Input<string> id, DerivedMetricState? state, CustomResourceOptions? opts = null)
public static DerivedMetric get(String name, Output<String> id, DerivedMetricState 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.
- Description string
- Metric
Name string - Name string
- Queries
List<Chronosphere.
Pulumi. Inputs. Derived Metric Query> - Slug string
- Description string
- Metric
Name string - Name string
- Queries
[]Derived
Metric Query Args - Slug string
- description String
- metric
Name String - name String
- queries
List<Derived
Metric Query> - slug String
- description string
- metric
Name string - name string
- queries
Derived
Metric Query[] - slug string
- description String
- metric
Name String - name String
- queries List<Property Map>
- slug String
Supporting Types
DerivedMetricQuery, DerivedMetricQueryArgs
DerivedMetricQueryQuery, DerivedMetricQueryQueryArgs
- expr String
- variables List<Property Map>
DerivedMetricQueryQueryVariable, DerivedMetricQueryQueryVariableArgs
- Default
Selector string - Name string
- Default
Selector string - Name string
- default
Selector String - name String
- default
Selector string - name string
- default_
selector str - name str
- default
Selector String - name String
DerivedMetricQuerySelector, DerivedMetricQuerySelectorArgs
- Labels Dictionary<string, string>
- Labels map[string]string
- labels Map<String,String>
- labels {[key: string]: string}
- labels Mapping[str, str]
- labels Map<String>
Package Details
- Repository
- chronosphere chronosphereio/pulumi-chronosphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
chronosphere
Terraform Provider.