All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.trafficmanager.kotlin.TrafficmanagerFunctions.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.trafficmanager.kotlin

import com.pulumi.azure.trafficmanager.TrafficmanagerFunctions.getGeographicalLocationPlain
import com.pulumi.azure.trafficmanager.kotlin.inputs.GetGeographicalLocationPlainArgs
import com.pulumi.azure.trafficmanager.kotlin.inputs.GetGeographicalLocationPlainArgsBuilder
import com.pulumi.azure.trafficmanager.kotlin.outputs.GetGeographicalLocationResult
import com.pulumi.azure.trafficmanager.kotlin.outputs.GetGeographicalLocationResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

public object TrafficmanagerFunctions {
    /**
     * Use this data source to access the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy.
     * ## Example Usage
     * ### World)
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const example = azure.network.getTrafficManager({
     *     name: "World",
     * });
     * export const locationCode = example.then(example => example.id);
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * example = azure.network.get_traffic_manager(name="World")
     * pulumi.export("locationCode", example.id)
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Azure.Network.GetTrafficManager.Invoke(new()
     *     {
     *         Name = "World",
     *     });
     *     return new Dictionary
     *     {
     *         ["locationCode"] = example.Apply(getTrafficManagerResult => getTrafficManagerResult.Id),
     *     };
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		example, err := network.GetTrafficManager(ctx, &network.GetTrafficManagerArgs{
     * 			Name: "World",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		ctx.Export("locationCode", 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.network.NetworkFunctions;
     * import com.pulumi.azure.network.inputs.GetTrafficManagerArgs;
     * 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 = NetworkFunctions.getTrafficManager(GetTrafficManagerArgs.builder()
     *             .name("World")
     *             .build());
     *         ctx.export("locationCode", example.applyValue(getTrafficManagerResult -> getTrafficManagerResult.id()));
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: azure:network:getTrafficManager
     *       Arguments:
     *         name: World
     * outputs:
     *   locationCode: ${example.id}
     * ```
     * 
     * @param argument A collection of arguments for invoking getGeographicalLocation.
     * @return A collection of values returned by getGeographicalLocation.
     */
    @Deprecated(
        message = """
  azure.trafficmanager.getGeographicalLocation has been deprecated in favor of
      azure.network.getTrafficManager
  """,
    )
    public suspend fun getGeographicalLocation(argument: GetGeographicalLocationPlainArgs): GetGeographicalLocationResult =
        toKotlin(getGeographicalLocationPlain(argument.toJava()).await())

    /**
     * @see [getGeographicalLocation].
     * @param name Specifies the name of the Location, for example `World`, `Europe` or `Germany`.
     * @return A collection of values returned by getGeographicalLocation.
     */
    @Deprecated(
        message = """
  azure.trafficmanager.getGeographicalLocation has been deprecated in favor of
      azure.network.getTrafficManager
  """,
    )
    public suspend fun getGeographicalLocation(name: String): GetGeographicalLocationResult {
        val argument = GetGeographicalLocationPlainArgs(
            name = name,
        )
        return toKotlin(getGeographicalLocationPlain(argument.toJava()).await())
    }

    /**
     * @see [getGeographicalLocation].
     * @param argument Builder for [com.pulumi.azure.trafficmanager.kotlin.inputs.GetGeographicalLocationPlainArgs].
     * @return A collection of values returned by getGeographicalLocation.
     */
    @Deprecated(
        message = """
  azure.trafficmanager.getGeographicalLocation has been deprecated in favor of
      azure.network.getTrafficManager
  """,
    )
    public suspend fun getGeographicalLocation(argument: suspend GetGeographicalLocationPlainArgsBuilder.() -> Unit): GetGeographicalLocationResult {
        val builder = GetGeographicalLocationPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return toKotlin(getGeographicalLocationPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy