chronosphere.ConsumptionBudget
Create ConsumptionBudget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ConsumptionBudget(name: string, args: ConsumptionBudgetArgs, opts?: CustomResourceOptions);@overload
def ConsumptionBudget(resource_name: str,
args: ConsumptionBudgetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ConsumptionBudget(resource_name: str,
opts: Optional[ResourceOptions] = None,
consumption_config_id: Optional[str] = None,
name: Optional[str] = None,
alert_action_config: Optional[ConsumptionBudgetAlertActionConfigArgs] = None,
default_priority: Optional[int] = None,
notification_policy_id: Optional[str] = None,
partition_slug_path: Optional[str] = None,
priorities: Optional[Sequence[ConsumptionBudgetPriorityArgs]] = None,
resource: Optional[str] = None,
slug: Optional[str] = None,
thresholds: Optional[Sequence[ConsumptionBudgetThresholdArgs]] = None)func NewConsumptionBudget(ctx *Context, name string, args ConsumptionBudgetArgs, opts ...ResourceOption) (*ConsumptionBudget, error)public ConsumptionBudget(string name, ConsumptionBudgetArgs args, CustomResourceOptions? opts = null)
public ConsumptionBudget(String name, ConsumptionBudgetArgs args)
public ConsumptionBudget(String name, ConsumptionBudgetArgs args, CustomResourceOptions options)
type: chronosphere:ConsumptionBudget
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 ConsumptionBudgetArgs
- 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 ConsumptionBudgetArgs
- 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 ConsumptionBudgetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsumptionBudgetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConsumptionBudgetArgs
- 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 consumptionBudgetResource = new Pulumi.ConsumptionBudget("consumptionBudgetResource", new()
{
ConsumptionConfigId = "string",
Name = "string",
AlertActionConfig = new Pulumi.Inputs.ConsumptionBudgetAlertActionConfigArgs
{
Annotations =
{
{ "string", "string" },
},
InstantRateSustainSecs = 0,
Labels =
{
{ "string", "string" },
},
},
DefaultPriority = 0,
NotificationPolicyId = "string",
PartitionSlugPath = "string",
Priorities = new[]
{
new Pulumi.Inputs.ConsumptionBudgetPriorityArgs
{
Filters = new[]
{
new Pulumi.Inputs.ConsumptionBudgetPriorityFilterArgs
{
DatasetId = "string",
LogFilter = new Pulumi.Inputs.ConsumptionBudgetPriorityFilterLogFilterArgs
{
Query = "string",
},
},
},
Priority = 0,
},
},
Resource = "string",
Slug = "string",
Thresholds = new[]
{
new Pulumi.Inputs.ConsumptionBudgetThresholdArgs
{
Action = "string",
InstantRate = new Pulumi.Inputs.ConsumptionBudgetThresholdInstantRateArgs
{
FixedValuePerSec = 0,
},
Type = "string",
Volume = new Pulumi.Inputs.ConsumptionBudgetThresholdVolumeArgs
{
FixedValue = 0,
},
},
},
});
example, err := chronosphere.NewConsumptionBudget(ctx, "consumptionBudgetResource", &chronosphere.ConsumptionBudgetArgs{
ConsumptionConfigId: pulumi.String("string"),
Name: pulumi.String("string"),
AlertActionConfig: &chronosphere.ConsumptionBudgetAlertActionConfigArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
InstantRateSustainSecs: pulumi.Int(0),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
DefaultPriority: pulumi.Int(0),
NotificationPolicyId: pulumi.String("string"),
PartitionSlugPath: pulumi.String("string"),
Priorities: chronosphere.ConsumptionBudgetPriorityArray{
&chronosphere.ConsumptionBudgetPriorityArgs{
Filters: chronosphere.ConsumptionBudgetPriorityFilterArray{
&chronosphere.ConsumptionBudgetPriorityFilterArgs{
DatasetId: pulumi.String("string"),
LogFilter: &chronosphere.ConsumptionBudgetPriorityFilterLogFilterArgs{
Query: pulumi.String("string"),
},
},
},
Priority: pulumi.Int(0),
},
},
Resource: pulumi.String("string"),
Slug: pulumi.String("string"),
Thresholds: chronosphere.ConsumptionBudgetThresholdArray{
&chronosphere.ConsumptionBudgetThresholdArgs{
Action: pulumi.String("string"),
InstantRate: &chronosphere.ConsumptionBudgetThresholdInstantRateArgs{
FixedValuePerSec: pulumi.Int(0),
},
Type: pulumi.String("string"),
Volume: &chronosphere.ConsumptionBudgetThresholdVolumeArgs{
FixedValue: pulumi.Int(0),
},
},
},
})
var consumptionBudgetResource = new ConsumptionBudget("consumptionBudgetResource", ConsumptionBudgetArgs.builder()
.consumptionConfigId("string")
.name("string")
.alertActionConfig(ConsumptionBudgetAlertActionConfigArgs.builder()
.annotations(Map.of("string", "string"))
.instantRateSustainSecs(0)
.labels(Map.of("string", "string"))
.build())
.defaultPriority(0)
.notificationPolicyId("string")
.partitionSlugPath("string")
.priorities(ConsumptionBudgetPriorityArgs.builder()
.filters(ConsumptionBudgetPriorityFilterArgs.builder()
.datasetId("string")
.logFilter(ConsumptionBudgetPriorityFilterLogFilterArgs.builder()
.query("string")
.build())
.build())
.priority(0)
.build())
.resource("string")
.slug("string")
.thresholds(ConsumptionBudgetThresholdArgs.builder()
.action("string")
.instantRate(ConsumptionBudgetThresholdInstantRateArgs.builder()
.fixedValuePerSec(0)
.build())
.type("string")
.volume(ConsumptionBudgetThresholdVolumeArgs.builder()
.fixedValue(0)
.build())
.build())
.build());
consumption_budget_resource = chronosphere.ConsumptionBudget("consumptionBudgetResource",
consumption_config_id="string",
name="string",
alert_action_config={
"annotations": {
"string": "string",
},
"instant_rate_sustain_secs": 0,
"labels": {
"string": "string",
},
},
default_priority=0,
notification_policy_id="string",
partition_slug_path="string",
priorities=[{
"filters": [{
"dataset_id": "string",
"log_filter": {
"query": "string",
},
}],
"priority": 0,
}],
resource="string",
slug="string",
thresholds=[{
"action": "string",
"instant_rate": {
"fixed_value_per_sec": 0,
},
"type": "string",
"volume": {
"fixed_value": 0,
},
}])
const consumptionBudgetResource = new chronosphere.ConsumptionBudget("consumptionBudgetResource", {
consumptionConfigId: "string",
name: "string",
alertActionConfig: {
annotations: {
string: "string",
},
instantRateSustainSecs: 0,
labels: {
string: "string",
},
},
defaultPriority: 0,
notificationPolicyId: "string",
partitionSlugPath: "string",
priorities: [{
filters: [{
datasetId: "string",
logFilter: {
query: "string",
},
}],
priority: 0,
}],
resource: "string",
slug: "string",
thresholds: [{
action: "string",
instantRate: {
fixedValuePerSec: 0,
},
type: "string",
volume: {
fixedValue: 0,
},
}],
});
type: chronosphere:ConsumptionBudget
properties:
alertActionConfig:
annotations:
string: string
instantRateSustainSecs: 0
labels:
string: string
consumptionConfigId: string
defaultPriority: 0
name: string
notificationPolicyId: string
partitionSlugPath: string
priorities:
- filters:
- datasetId: string
logFilter:
query: string
priority: 0
resource: string
slug: string
thresholds:
- action: string
instantRate:
fixedValuePerSec: 0
type: string
volume:
fixedValue: 0
ConsumptionBudget 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 ConsumptionBudget resource accepts the following input properties:
- Consumption
Config stringId - Name string
- Alert
Action Chronosphere.Config Pulumi. Inputs. Consumption Budget Alert Action Config - Default
Priority int - Notification
Policy stringId - Partition
Slug stringPath - Priorities
List<Chronosphere.
Pulumi. Inputs. Consumption Budget Priority> - Resource string
- Slug string
- Thresholds
List<Chronosphere.
Pulumi. Inputs. Consumption Budget Threshold>
- consumption
Config StringId - name String
- alert
Action Property MapConfig - default
Priority Number - notification
Policy StringId - partition
Slug StringPath - priorities List<Property Map>
- resource String
- slug String
- thresholds List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the ConsumptionBudget 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 ConsumptionBudget Resource
Get an existing ConsumptionBudget 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?: ConsumptionBudgetState, opts?: CustomResourceOptions): ConsumptionBudget@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_action_config: Optional[ConsumptionBudgetAlertActionConfigArgs] = None,
consumption_config_id: Optional[str] = None,
default_priority: Optional[int] = None,
name: Optional[str] = None,
notification_policy_id: Optional[str] = None,
partition_slug_path: Optional[str] = None,
priorities: Optional[Sequence[ConsumptionBudgetPriorityArgs]] = None,
resource: Optional[str] = None,
slug: Optional[str] = None,
thresholds: Optional[Sequence[ConsumptionBudgetThresholdArgs]] = None) -> ConsumptionBudgetfunc GetConsumptionBudget(ctx *Context, name string, id IDInput, state *ConsumptionBudgetState, opts ...ResourceOption) (*ConsumptionBudget, error)public static ConsumptionBudget Get(string name, Input<string> id, ConsumptionBudgetState? state, CustomResourceOptions? opts = null)public static ConsumptionBudget get(String name, Output<String> id, ConsumptionBudgetState state, CustomResourceOptions options)resources: _: type: chronosphere:ConsumptionBudget get: id: ${id}- 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.
- Alert
Action Chronosphere.Config Pulumi. Inputs. Consumption Budget Alert Action Config - Consumption
Config stringId - Default
Priority int - Name string
- Notification
Policy stringId - Partition
Slug stringPath - Priorities
List<Chronosphere.
Pulumi. Inputs. Consumption Budget Priority> - Resource string
- Slug string
- Thresholds
List<Chronosphere.
Pulumi. Inputs. Consumption Budget Threshold>
- alert
Action Property MapConfig - consumption
Config StringId - default
Priority Number - name String
- notification
Policy StringId - partition
Slug StringPath - priorities List<Property Map>
- resource String
- slug String
- thresholds List<Property Map>
Supporting Types
ConsumptionBudgetAlertActionConfig, ConsumptionBudgetAlertActionConfigArgs
- Annotations Dictionary<string, string>
- Instant
Rate intSustain Secs - Labels Dictionary<string, string>
- Annotations map[string]string
- Instant
Rate intSustain Secs - Labels map[string]string
- annotations Map<String,String>
- instant
Rate IntegerSustain Secs - labels Map<String,String>
- annotations {[key: string]: string}
- instant
Rate numberSustain Secs - labels {[key: string]: string}
- annotations Mapping[str, str]
- instant_
rate_ intsustain_ secs - labels Mapping[str, str]
- annotations Map<String>
- instant
Rate NumberSustain Secs - labels Map<String>
ConsumptionBudgetPriority, ConsumptionBudgetPriorityArgs
ConsumptionBudgetPriorityFilter, ConsumptionBudgetPriorityFilterArgs
- dataset
Id String - log
Filter Property Map
ConsumptionBudgetPriorityFilterLogFilter, ConsumptionBudgetPriorityFilterLogFilterArgs
- Query string
- Query string
- query String
- query string
- query str
- query String
ConsumptionBudgetThreshold, ConsumptionBudgetThresholdArgs
- action String
- instant
Rate Property Map - type String
- volume Property Map
ConsumptionBudgetThresholdInstantRate, ConsumptionBudgetThresholdInstantRateArgs
- Fixed
Value intPer Sec
- Fixed
Value intPer Sec
- fixed
Value IntegerPer Sec
- fixed
Value numberPer Sec
- fixed
Value NumberPer Sec
ConsumptionBudgetThresholdVolume, ConsumptionBudgetThresholdVolumeArgs
- Fixed
Value int
- Fixed
Value int
- fixed
Value Integer
- fixed
Value number
- fixed_
value int
- fixed
Value Number
Package Details
- Repository
- chronosphere chronosphereio/pulumi-chronosphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
chronosphereTerraform Provider.
