datadog.CustomAllocationRules
Provides a Datadog Custom Allocation Rule Order API resource. This can be used to manage the order of Datadog Custom Allocation Rules.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
rule1:
type: datadog:CustomAllocationRule
name: rule_1
properties:
costsToAllocates:
- condition: is
tag: aws_product
value: AmazonEC2
enabled: true
providernames:
- aws
ruleName: my-custom-rule-1
strategy:
- allocatedByTagKeys:
- team
basedOnCosts:
- condition: is
tag: aws_product
value: AmazonEC2
method: even
rule2:
type: datadog:CustomAllocationRule
name: rule_2
properties:
costsToAllocates:
- condition: is
tag: aws_product
value: AmazonS3
enabled: true
providernames:
- aws
ruleName: my-custom-rule-2
strategy:
- allocatedByTagKeys:
- team
basedOnCosts:
- condition: is
tag: aws_product
value: AmazonS3
method: even
rule3:
type: datadog:CustomAllocationRule
name: rule_3
properties:
costsToAllocates:
- condition: is
tag: aws_product
value: AmazonRDS
enabled: true
providernames:
- aws
ruleName: my-custom-rule-3
strategy:
- allocatedByTagKeys:
- team
basedOnCosts:
- condition: is
tag: aws_product
value: AmazonRDS
method: even
# Manage the order of custom allocation rules
order:
type: datadog:CustomAllocationRules
properties:
ruleIds:
- ${rule1.id}
- ${rule2.id}
- ${rule3.id}
Create CustomAllocationRules Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomAllocationRules(name: string, args: CustomAllocationRulesArgs, opts?: CustomResourceOptions);
@overload
def CustomAllocationRules(resource_name: str,
args: CustomAllocationRulesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomAllocationRules(resource_name: str,
opts: Optional[ResourceOptions] = None,
rule_ids: Optional[Sequence[str]] = None)
func NewCustomAllocationRules(ctx *Context, name string, args CustomAllocationRulesArgs, opts ...ResourceOption) (*CustomAllocationRules, error)
public CustomAllocationRules(string name, CustomAllocationRulesArgs args, CustomResourceOptions? opts = null)
public CustomAllocationRules(String name, CustomAllocationRulesArgs args)
public CustomAllocationRules(String name, CustomAllocationRulesArgs args, CustomResourceOptions options)
type: datadog:CustomAllocationRules
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 CustomAllocationRulesArgs
- 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 CustomAllocationRulesArgs
- 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 CustomAllocationRulesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomAllocationRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomAllocationRulesArgs
- 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 customAllocationRulesResource = new Datadog.CustomAllocationRules("customAllocationRulesResource", new()
{
RuleIds = new[]
{
"string",
},
});
example, err := datadog.NewCustomAllocationRules(ctx, "customAllocationRulesResource", &datadog.CustomAllocationRulesArgs{
RuleIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var customAllocationRulesResource = new CustomAllocationRules("customAllocationRulesResource", CustomAllocationRulesArgs.builder()
.ruleIds("string")
.build());
custom_allocation_rules_resource = datadog.CustomAllocationRules("customAllocationRulesResource", rule_ids=["string"])
const customAllocationRulesResource = new datadog.CustomAllocationRules("customAllocationRulesResource", {ruleIds: ["string"]});
type: datadog:CustomAllocationRules
properties:
ruleIds:
- string
CustomAllocationRules 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 CustomAllocationRules resource accepts the following input properties:
- Rule
Ids List<string> - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- Rule
Ids []string - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule
Ids List<String> - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule
Ids string[] - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule_
ids Sequence[str] - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule
Ids List<String> - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomAllocationRules 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 CustomAllocationRules Resource
Get an existing CustomAllocationRules 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?: CustomAllocationRulesState, opts?: CustomResourceOptions): CustomAllocationRules
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
rule_ids: Optional[Sequence[str]] = None) -> CustomAllocationRules
func GetCustomAllocationRules(ctx *Context, name string, id IDInput, state *CustomAllocationRulesState, opts ...ResourceOption) (*CustomAllocationRules, error)
public static CustomAllocationRules Get(string name, Input<string> id, CustomAllocationRulesState? state, CustomResourceOptions? opts = null)
public static CustomAllocationRules get(String name, Output<String> id, CustomAllocationRulesState state, CustomResourceOptions options)
resources: _: type: datadog:CustomAllocationRules 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.
- Rule
Ids List<string> - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- Rule
Ids []string - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule
Ids List<String> - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule
Ids string[] - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule_
ids Sequence[str] - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
- rule
Ids List<String> - The list of Custom Allocation Rule IDs, in order. Rules are executed in the order specified in this list. Comes from the
id
field on adatadog.CustomAllocationRule
resource.
Import
The pulumi import
command can be used, for example:
$ pulumi import datadog:index/customAllocationRules:CustomAllocationRules order order
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.