get Budget
Data source for managing an AWS Web Services Budgets Budget.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.budgets.getBudget({
name: testAwsBudgetsBudget.name,
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.budgets.get_budget(name=test_aws_budgets_budget["name"])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.Budgets.GetBudget.Invoke(new()
{
Name = testAwsBudgetsBudget.Name,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := budgets.LookupBudget(ctx, &budgets.LookupBudgetArgs{
Name: testAwsBudgetsBudget.Name,
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.budgets.BudgetsFunctions;
import com.pulumi.aws.budgets.inputs.GetBudgetArgs;
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) {
final var test = BudgetsFunctions.getBudget(GetBudgetArgs.builder()
.name(testAwsBudgetsBudget.name())
.build());
}
}
Content copied to clipboard
variables:
test:
fn::invoke:
function: aws:budgets:getBudget
arguments:
name: ${testAwsBudgetsBudget.name}
Content copied to clipboard
Return
A collection of values returned by getBudget.
Parameters
argument
A collection of arguments for invoking getBudget.
suspend fun getBudget(accountId: String? = null, name: String, namePrefix: String? = null, tags: Map<String, String>? = null): GetBudgetResult
Return
A collection of values returned by getBudget.
Parameters
account Id
The ID of the target account for budget. Will use current user's account_id by default if omitted.
name
The name of a budget. Unique within accounts. The following arguments are optional:
name Prefix
The prefix of the name of a budget. Unique within accounts.
tags
Map of tags assigned to the resource.
See also
Return
A collection of values returned by getBudget.
Parameters
argument
Builder for com.pulumi.aws.budgets.kotlin.inputs.GetBudgetPlainArgs.