com.pulumi.azure.appplatform.kotlin.AppplatformFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.appplatform.kotlin
import com.pulumi.azure.appplatform.AppplatformFunctions.getSpringCloudAppPlain
import com.pulumi.azure.appplatform.AppplatformFunctions.getSpringCloudServicePlain
import com.pulumi.azure.appplatform.kotlin.inputs.GetSpringCloudAppPlainArgs
import com.pulumi.azure.appplatform.kotlin.inputs.GetSpringCloudAppPlainArgsBuilder
import com.pulumi.azure.appplatform.kotlin.inputs.GetSpringCloudServicePlainArgs
import com.pulumi.azure.appplatform.kotlin.inputs.GetSpringCloudServicePlainArgsBuilder
import com.pulumi.azure.appplatform.kotlin.outputs.GetSpringCloudAppResult
import com.pulumi.azure.appplatform.kotlin.outputs.GetSpringCloudServiceResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.appplatform.kotlin.outputs.GetSpringCloudAppResult.Companion.toKotlin as getSpringCloudAppResultToKotlin
import com.pulumi.azure.appplatform.kotlin.outputs.GetSpringCloudServiceResult.Companion.toKotlin as getSpringCloudServiceResultToKotlin
public object AppplatformFunctions {
/**
* Use this data source to access information about an existing Spring Cloud Application.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.appplatform.getSpringCloudApp({
* name: exampleAzurermSpringCloudApp.name,
* resourceGroupName: exampleAzurermSpringCloudApp.resourceGroupName,
* serviceName: exampleAzurermSpringCloudApp.serviceName,
* });
* export const springCloudAppId = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.appplatform.get_spring_cloud_app(name=example_azurerm_spring_cloud_app["name"],
* resource_group_name=example_azurerm_spring_cloud_app["resourceGroupName"],
* service_name=example_azurerm_spring_cloud_app["serviceName"])
* pulumi.export("springCloudAppId", example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.AppPlatform.GetSpringCloudApp.Invoke(new()
* {
* Name = exampleAzurermSpringCloudApp.Name,
* ResourceGroupName = exampleAzurermSpringCloudApp.ResourceGroupName,
* ServiceName = exampleAzurermSpringCloudApp.ServiceName,
* });
* return new Dictionary
* {
* ["springCloudAppId"] = example.Apply(getSpringCloudAppResult => getSpringCloudAppResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appplatform"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := appplatform.LookupSpringCloudApp(ctx, &appplatform.LookupSpringCloudAppArgs{
* Name: exampleAzurermSpringCloudApp.Name,
* ResourceGroupName: exampleAzurermSpringCloudApp.ResourceGroupName,
* ServiceName: exampleAzurermSpringCloudApp.ServiceName,
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("springCloudAppId", 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.appplatform.AppplatformFunctions;
* import com.pulumi.azure.appplatform.inputs.GetSpringCloudAppArgs;
* 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 = AppplatformFunctions.getSpringCloudApp(GetSpringCloudAppArgs.builder()
* .name(exampleAzurermSpringCloudApp.name())
* .resourceGroupName(exampleAzurermSpringCloudApp.resourceGroupName())
* .serviceName(exampleAzurermSpringCloudApp.serviceName())
* .build());
* ctx.export("springCloudAppId", example.applyValue(getSpringCloudAppResult -> getSpringCloudAppResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:appplatform:getSpringCloudApp
* Arguments:
* name: ${exampleAzurermSpringCloudApp.name}
* resourceGroupName: ${exampleAzurermSpringCloudApp.resourceGroupName}
* serviceName: ${exampleAzurermSpringCloudApp.serviceName}
* outputs:
* springCloudAppId: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getSpringCloudApp.
* @return A collection of values returned by getSpringCloudApp.
*/
public suspend fun getSpringCloudApp(argument: GetSpringCloudAppPlainArgs):
GetSpringCloudAppResult =
getSpringCloudAppResultToKotlin(getSpringCloudAppPlain(argument.toJava()).await())
/**
* @see [getSpringCloudApp].
* @param name The name of the Spring Cloud Application.
* @param resourceGroupName The name of the Resource Group where the Spring Cloud Application exists.
* @param serviceName The name of the Spring Cloud Service.
* @return A collection of values returned by getSpringCloudApp.
*/
public suspend fun getSpringCloudApp(
name: String,
resourceGroupName: String,
serviceName: String,
): GetSpringCloudAppResult {
val argument = GetSpringCloudAppPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
serviceName = serviceName,
)
return getSpringCloudAppResultToKotlin(getSpringCloudAppPlain(argument.toJava()).await())
}
/**
* @see [getSpringCloudApp].
* @param argument Builder for [com.pulumi.azure.appplatform.kotlin.inputs.GetSpringCloudAppPlainArgs].
* @return A collection of values returned by getSpringCloudApp.
*/
public suspend
fun getSpringCloudApp(argument: suspend GetSpringCloudAppPlainArgsBuilder.() -> Unit):
GetSpringCloudAppResult {
val builder = GetSpringCloudAppPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getSpringCloudAppResultToKotlin(getSpringCloudAppPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing Spring Cloud Service.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.appplatform.getSpringCloudService({
* name: exampleAzurermSpringCloudService.name,
* resourceGroupName: exampleAzurermSpringCloudService.resourceGroupName,
* });
* export const springCloudServiceId = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.appplatform.get_spring_cloud_service(name=example_azurerm_spring_cloud_service["name"],
* resource_group_name=example_azurerm_spring_cloud_service["resourceGroupName"])
* pulumi.export("springCloudServiceId", example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.AppPlatform.GetSpringCloudService.Invoke(new()
* {
* Name = exampleAzurermSpringCloudService.Name,
* ResourceGroupName = exampleAzurermSpringCloudService.ResourceGroupName,
* });
* return new Dictionary
* {
* ["springCloudServiceId"] = example.Apply(getSpringCloudServiceResult => getSpringCloudServiceResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appplatform"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := appplatform.LookupSpringCloudService(ctx, &appplatform.LookupSpringCloudServiceArgs{
* Name: exampleAzurermSpringCloudService.Name,
* ResourceGroupName: exampleAzurermSpringCloudService.ResourceGroupName,
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("springCloudServiceId", 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.appplatform.AppplatformFunctions;
* import com.pulumi.azure.appplatform.inputs.GetSpringCloudServiceArgs;
* 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 = AppplatformFunctions.getSpringCloudService(GetSpringCloudServiceArgs.builder()
* .name(exampleAzurermSpringCloudService.name())
* .resourceGroupName(exampleAzurermSpringCloudService.resourceGroupName())
* .build());
* ctx.export("springCloudServiceId", example.applyValue(getSpringCloudServiceResult -> getSpringCloudServiceResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:appplatform:getSpringCloudService
* Arguments:
* name: ${exampleAzurermSpringCloudService.name}
* resourceGroupName: ${exampleAzurermSpringCloudService.resourceGroupName}
* outputs:
* springCloudServiceId: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getSpringCloudService.
* @return A collection of values returned by getSpringCloudService.
*/
public suspend fun getSpringCloudService(argument: GetSpringCloudServicePlainArgs):
GetSpringCloudServiceResult =
getSpringCloudServiceResultToKotlin(getSpringCloudServicePlain(argument.toJava()).await())
/**
* @see [getSpringCloudService].
* @param name Specifies The name of the Spring Cloud Service resource.
* @param resourceGroupName Specifies the name of the Resource Group where the Spring Cloud Service exists.
* @return A collection of values returned by getSpringCloudService.
*/
public suspend fun getSpringCloudService(name: String, resourceGroupName: String):
GetSpringCloudServiceResult {
val argument = GetSpringCloudServicePlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getSpringCloudServiceResultToKotlin(getSpringCloudServicePlain(argument.toJava()).await())
}
/**
* @see [getSpringCloudService].
* @param argument Builder for [com.pulumi.azure.appplatform.kotlin.inputs.GetSpringCloudServicePlainArgs].
* @return A collection of values returned by getSpringCloudService.
*/
public suspend
fun getSpringCloudService(argument: suspend GetSpringCloudServicePlainArgsBuilder.() -> Unit):
GetSpringCloudServiceResult {
val builder = GetSpringCloudServicePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getSpringCloudServiceResultToKotlin(getSpringCloudServicePlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy