Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.billing.kotlin.BillingFunctions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.billing.kotlin
import com.pulumi.azure.billing.BillingFunctions.getEnrollmentAccountScopePlain
import com.pulumi.azure.billing.BillingFunctions.getMcaAccountScopePlain
import com.pulumi.azure.billing.BillingFunctions.getMpaAccountScopePlain
import com.pulumi.azure.billing.kotlin.inputs.GetEnrollmentAccountScopePlainArgs
import com.pulumi.azure.billing.kotlin.inputs.GetEnrollmentAccountScopePlainArgsBuilder
import com.pulumi.azure.billing.kotlin.inputs.GetMcaAccountScopePlainArgs
import com.pulumi.azure.billing.kotlin.inputs.GetMcaAccountScopePlainArgsBuilder
import com.pulumi.azure.billing.kotlin.inputs.GetMpaAccountScopePlainArgs
import com.pulumi.azure.billing.kotlin.inputs.GetMpaAccountScopePlainArgsBuilder
import com.pulumi.azure.billing.kotlin.outputs.GetEnrollmentAccountScopeResult
import com.pulumi.azure.billing.kotlin.outputs.GetMcaAccountScopeResult
import com.pulumi.azure.billing.kotlin.outputs.GetMpaAccountScopeResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.billing.kotlin.outputs.GetEnrollmentAccountScopeResult.Companion.toKotlin as getEnrollmentAccountScopeResultToKotlin
import com.pulumi.azure.billing.kotlin.outputs.GetMcaAccountScopeResult.Companion.toKotlin as getMcaAccountScopeResultToKotlin
import com.pulumi.azure.billing.kotlin.outputs.GetMpaAccountScopeResult.Companion.toKotlin as getMpaAccountScopeResultToKotlin
public object BillingFunctions {
/**
* Use this data source to access information about an existing Enrollment Account Billing Scope.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.billing.getEnrollmentAccountScope({
* billingAccountName: "existing",
* enrollmentAccountName: "existing",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.billing.get_enrollment_account_scope(billing_account_name="existing",
* enrollment_account_name="existing")
* pulumi.export("id", example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Billing.GetEnrollmentAccountScope.Invoke(new()
* {
* BillingAccountName = "existing",
* EnrollmentAccountName = "existing",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getEnrollmentAccountScopeResult => getEnrollmentAccountScopeResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := billing.GetEnrollmentAccountScope(ctx, &billing.GetEnrollmentAccountScopeArgs{
* BillingAccountName: "existing",
* EnrollmentAccountName: "existing",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("id", example.Id)
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.billing.BillingFunctions;
* import com.pulumi.azure.billing.inputs.GetEnrollmentAccountScopeArgs;
* 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 example = BillingFunctions.getEnrollmentAccountScope(GetEnrollmentAccountScopeArgs.builder()
* .billingAccountName("existing")
* .enrollmentAccountName("existing")
* .build());
* ctx.export("id", example.applyValue(getEnrollmentAccountScopeResult -> getEnrollmentAccountScopeResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:billing:getEnrollmentAccountScope
* Arguments:
* billingAccountName: existing
* enrollmentAccountName: existing
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getEnrollmentAccountScope.
* @return A collection of values returned by getEnrollmentAccountScope.
*/
public suspend fun getEnrollmentAccountScope(argument: GetEnrollmentAccountScopePlainArgs): GetEnrollmentAccountScopeResult =
getEnrollmentAccountScopeResultToKotlin(getEnrollmentAccountScopePlain(argument.toJava()).await())
/**
* @see [getEnrollmentAccountScope].
* @param billingAccountName The Billing Account Name of the Enterprise Account.
* @param enrollmentAccountName The Enrollment Account Name in the above Enterprise Account.
* @return A collection of values returned by getEnrollmentAccountScope.
*/
public suspend fun getEnrollmentAccountScope(
billingAccountName: String,
enrollmentAccountName: String,
): GetEnrollmentAccountScopeResult {
val argument = GetEnrollmentAccountScopePlainArgs(
billingAccountName = billingAccountName,
enrollmentAccountName = enrollmentAccountName,
)
return getEnrollmentAccountScopeResultToKotlin(getEnrollmentAccountScopePlain(argument.toJava()).await())
}
/**
* @see [getEnrollmentAccountScope].
* @param argument Builder for [com.pulumi.azure.billing.kotlin.inputs.GetEnrollmentAccountScopePlainArgs].
* @return A collection of values returned by getEnrollmentAccountScope.
*/
public suspend fun getEnrollmentAccountScope(argument: suspend GetEnrollmentAccountScopePlainArgsBuilder.() -> Unit): GetEnrollmentAccountScopeResult {
val builder = GetEnrollmentAccountScopePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getEnrollmentAccountScopeResultToKotlin(getEnrollmentAccountScopePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access an ID for your MCA Account billing scope.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.billing.getMcaAccountScope({
* billingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* billingProfileName: "PE2Q-NOIT-BG7-TGB",
* invoiceSectionName: "MTT4-OBS7-PJA-TGB",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.billing.get_mca_account_scope(billing_account_name="e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* billing_profile_name="PE2Q-NOIT-BG7-TGB",
* invoice_section_name="MTT4-OBS7-PJA-TGB")
* pulumi.export("id", example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Billing.GetMcaAccountScope.Invoke(new()
* {
* BillingAccountName = "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* BillingProfileName = "PE2Q-NOIT-BG7-TGB",
* InvoiceSectionName = "MTT4-OBS7-PJA-TGB",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getMcaAccountScopeResult => getMcaAccountScopeResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := billing.GetMcaAccountScope(ctx, &billing.GetMcaAccountScopeArgs{
* BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* BillingProfileName: "PE2Q-NOIT-BG7-TGB",
* InvoiceSectionName: "MTT4-OBS7-PJA-TGB",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("id", example.Id)
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.billing.BillingFunctions;
* import com.pulumi.azure.billing.inputs.GetMcaAccountScopeArgs;
* 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 example = BillingFunctions.getMcaAccountScope(GetMcaAccountScopeArgs.builder()
* .billingAccountName("e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31")
* .billingProfileName("PE2Q-NOIT-BG7-TGB")
* .invoiceSectionName("MTT4-OBS7-PJA-TGB")
* .build());
* ctx.export("id", example.applyValue(getMcaAccountScopeResult -> getMcaAccountScopeResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:billing:getMcaAccountScope
* Arguments:
* billingAccountName: e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31
* billingProfileName: PE2Q-NOIT-BG7-TGB
* invoiceSectionName: MTT4-OBS7-PJA-TGB
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getMcaAccountScope.
* @return A collection of values returned by getMcaAccountScope.
*/
public suspend fun getMcaAccountScope(argument: GetMcaAccountScopePlainArgs): GetMcaAccountScopeResult =
getMcaAccountScopeResultToKotlin(getMcaAccountScopePlain(argument.toJava()).await())
/**
* @see [getMcaAccountScope].
* @param billingAccountName The Billing Account Name of the MCA account.
* @param billingProfileName The Billing Profile Name in the above Billing Account.
* @param invoiceSectionName The Invoice Section Name in the above Billing Profile.
* @return A collection of values returned by getMcaAccountScope.
*/
public suspend fun getMcaAccountScope(
billingAccountName: String,
billingProfileName: String,
invoiceSectionName: String,
): GetMcaAccountScopeResult {
val argument = GetMcaAccountScopePlainArgs(
billingAccountName = billingAccountName,
billingProfileName = billingProfileName,
invoiceSectionName = invoiceSectionName,
)
return getMcaAccountScopeResultToKotlin(getMcaAccountScopePlain(argument.toJava()).await())
}
/**
* @see [getMcaAccountScope].
* @param argument Builder for [com.pulumi.azure.billing.kotlin.inputs.GetMcaAccountScopePlainArgs].
* @return A collection of values returned by getMcaAccountScope.
*/
public suspend fun getMcaAccountScope(argument: suspend GetMcaAccountScopePlainArgsBuilder.() -> Unit): GetMcaAccountScopeResult {
val builder = GetMcaAccountScopePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMcaAccountScopeResultToKotlin(getMcaAccountScopePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access an ID for your MPA Account billing scope.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.billing.getMpaAccountScope({
* billingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* customerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.billing.get_mpa_account_scope(billing_account_name="e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* customer_name="2281f543-7321-4cf9-1e23-edb4Oc31a31c")
* pulumi.export("id", example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Billing.GetMpaAccountScope.Invoke(new()
* {
* BillingAccountName = "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* CustomerName = "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getMpaAccountScopeResult => getMpaAccountScopeResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/billing"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := billing.GetMpaAccountScope(ctx, &billing.GetMpaAccountScopeArgs{
* BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
* CustomerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("id", example.Id)
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.billing.BillingFunctions;
* import com.pulumi.azure.billing.inputs.GetMpaAccountScopeArgs;
* 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 example = BillingFunctions.getMpaAccountScope(GetMpaAccountScopeArgs.builder()
* .billingAccountName("e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31")
* .customerName("2281f543-7321-4cf9-1e23-edb4Oc31a31c")
* .build());
* ctx.export("id", example.applyValue(getMpaAccountScopeResult -> getMpaAccountScopeResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:billing:getMpaAccountScope
* Arguments:
* billingAccountName: e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31
* customerName: 2281f543-7321-4cf9-1e23-edb4Oc31a31c
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getMpaAccountScope.
* @return A collection of values returned by getMpaAccountScope.
*/
public suspend fun getMpaAccountScope(argument: GetMpaAccountScopePlainArgs): GetMpaAccountScopeResult =
getMpaAccountScopeResultToKotlin(getMpaAccountScopePlain(argument.toJava()).await())
/**
* @see [getMpaAccountScope].
* @param billingAccountName The Billing Account Name of the MPA account.
* @param customerName The Customer Name in the above Billing Account.
* @return A collection of values returned by getMpaAccountScope.
*/
public suspend fun getMpaAccountScope(billingAccountName: String, customerName: String): GetMpaAccountScopeResult {
val argument = GetMpaAccountScopePlainArgs(
billingAccountName = billingAccountName,
customerName = customerName,
)
return getMpaAccountScopeResultToKotlin(getMpaAccountScopePlain(argument.toJava()).await())
}
/**
* @see [getMpaAccountScope].
* @param argument Builder for [com.pulumi.azure.billing.kotlin.inputs.GetMpaAccountScopePlainArgs].
* @return A collection of values returned by getMpaAccountScope.
*/
public suspend fun getMpaAccountScope(argument: suspend GetMpaAccountScopePlainArgsBuilder.() -> Unit): GetMpaAccountScopeResult {
val builder = GetMpaAccountScopePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMpaAccountScopeResultToKotlin(getMpaAccountScopePlain(builtArgument.toJava()).await())
}
}