com.pulumi.azure.nginx.kotlin.NginxFunctions.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.nginx.kotlin
import com.pulumi.azure.nginx.NginxFunctions.getCertificatePlain
import com.pulumi.azure.nginx.NginxFunctions.getConfigurationPlain
import com.pulumi.azure.nginx.NginxFunctions.getDeploymentPlain
import com.pulumi.azure.nginx.kotlin.inputs.GetCertificatePlainArgs
import com.pulumi.azure.nginx.kotlin.inputs.GetCertificatePlainArgsBuilder
import com.pulumi.azure.nginx.kotlin.inputs.GetConfigurationPlainArgs
import com.pulumi.azure.nginx.kotlin.inputs.GetConfigurationPlainArgsBuilder
import com.pulumi.azure.nginx.kotlin.inputs.GetDeploymentPlainArgs
import com.pulumi.azure.nginx.kotlin.inputs.GetDeploymentPlainArgsBuilder
import com.pulumi.azure.nginx.kotlin.outputs.GetCertificateResult
import com.pulumi.azure.nginx.kotlin.outputs.GetConfigurationResult
import com.pulumi.azure.nginx.kotlin.outputs.GetDeploymentResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.nginx.kotlin.outputs.GetCertificateResult.Companion.toKotlin as getCertificateResultToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.GetConfigurationResult.Companion.toKotlin as getConfigurationResultToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.GetDeploymentResult.Companion.toKotlin as getDeploymentResultToKotlin
public object NginxFunctions {
/**
* Use this data source to access information about an existing NGINX Certificate.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.nginx.getCertificate({
* name: "existing",
* nginxDeploymentId: exampleAzurermNginxDeployment.id,
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.nginx.get_certificate(name="existing",
* nginx_deployment_id=example_azurerm_nginx_deployment["id"])
* 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.Nginx.GetCertificate.Invoke(new()
* {
* Name = "existing",
* NginxDeploymentId = exampleAzurermNginxDeployment.Id,
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getCertificateResult => getCertificateResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/nginx"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := nginx.LookupCertificate(ctx, &nginx.LookupCertificateArgs{
* Name: "existing",
* NginxDeploymentId: exampleAzurermNginxDeployment.Id,
* }, 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.nginx.NginxFunctions;
* import com.pulumi.azure.nginx.inputs.GetCertificateArgs;
* 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 = NginxFunctions.getCertificate(GetCertificateArgs.builder()
* .name("existing")
* .nginxDeploymentId(exampleAzurermNginxDeployment.id())
* .build());
* ctx.export("id", example.applyValue(getCertificateResult -> getCertificateResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:nginx:getCertificate
* Arguments:
* name: existing
* nginxDeploymentId: ${exampleAzurermNginxDeployment.id}
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getCertificate.
* @return A collection of values returned by getCertificate.
*/
public suspend fun getCertificate(argument: GetCertificatePlainArgs): GetCertificateResult =
getCertificateResultToKotlin(getCertificatePlain(argument.toJava()).await())
/**
* @see [getCertificate].
* @param name The name of the NGINX Certificate.
* @param nginxDeploymentId The ID of the NGINX Deployment that the certificate is associated with.
* @return A collection of values returned by getCertificate.
*/
public suspend fun getCertificate(name: String, nginxDeploymentId: String): GetCertificateResult {
val argument = GetCertificatePlainArgs(
name = name,
nginxDeploymentId = nginxDeploymentId,
)
return getCertificateResultToKotlin(getCertificatePlain(argument.toJava()).await())
}
/**
* @see [getCertificate].
* @param argument Builder for [com.pulumi.azure.nginx.kotlin.inputs.GetCertificatePlainArgs].
* @return A collection of values returned by getCertificate.
*/
public suspend fun getCertificate(argument: suspend GetCertificatePlainArgsBuilder.() -> Unit):
GetCertificateResult {
val builder = GetCertificatePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getCertificateResultToKotlin(getCertificatePlain(builtArgument.toJava()).await())
}
/**
*
* @param argument A collection of arguments for invoking getConfiguration.
* @return A collection of values returned by getConfiguration.
*/
public suspend fun getConfiguration(argument: GetConfigurationPlainArgs): GetConfigurationResult =
getConfigurationResultToKotlin(getConfigurationPlain(argument.toJava()).await())
/**
* @see [getConfiguration].
* @param nginxDeploymentId
* @return A collection of values returned by getConfiguration.
*/
public suspend fun getConfiguration(nginxDeploymentId: String): GetConfigurationResult {
val argument = GetConfigurationPlainArgs(
nginxDeploymentId = nginxDeploymentId,
)
return getConfigurationResultToKotlin(getConfigurationPlain(argument.toJava()).await())
}
/**
* @see [getConfiguration].
* @param argument Builder for [com.pulumi.azure.nginx.kotlin.inputs.GetConfigurationPlainArgs].
* @return A collection of values returned by getConfiguration.
*/
public suspend
fun getConfiguration(argument: suspend GetConfigurationPlainArgsBuilder.() -> Unit):
GetConfigurationResult {
val builder = GetConfigurationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getConfigurationResultToKotlin(getConfigurationPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing NGINX Deployment.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.nginx.getDeployment({
* name: "existing",
* resourceGroupName: "existing",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.nginx.get_deployment(name="existing",
* resource_group_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.Nginx.GetDeployment.Invoke(new()
* {
* Name = "existing",
* ResourceGroupName = "existing",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getDeploymentResult => getDeploymentResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/nginx"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := nginx.LookupDeployment(ctx, &nginx.LookupDeploymentArgs{
* Name: "existing",
* ResourceGroupName: "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.nginx.NginxFunctions;
* import com.pulumi.azure.nginx.inputs.GetDeploymentArgs;
* 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 = NginxFunctions.getDeployment(GetDeploymentArgs.builder()
* .name("existing")
* .resourceGroupName("existing")
* .build());
* ctx.export("id", example.applyValue(getDeploymentResult -> getDeploymentResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:nginx:getDeployment
* Arguments:
* name: existing
* resourceGroupName: existing
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getDeployment.
* @return A collection of values returned by getDeployment.
*/
public suspend fun getDeployment(argument: GetDeploymentPlainArgs): GetDeploymentResult =
getDeploymentResultToKotlin(getDeploymentPlain(argument.toJava()).await())
/**
* @see [getDeployment].
* @param name The name of this NGINX Deployment.
* @param resourceGroupName The name of the Resource Group where the NGINX Deployment exists.
* @return A collection of values returned by getDeployment.
*/
public suspend fun getDeployment(name: String, resourceGroupName: String): GetDeploymentResult {
val argument = GetDeploymentPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getDeploymentResultToKotlin(getDeploymentPlain(argument.toJava()).await())
}
/**
* @see [getDeployment].
* @param argument Builder for [com.pulumi.azure.nginx.kotlin.inputs.GetDeploymentPlainArgs].
* @return A collection of values returned by getDeployment.
*/
public suspend fun getDeployment(argument: suspend GetDeploymentPlainArgsBuilder.() -> Unit):
GetDeploymentResult {
val builder = GetDeploymentPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDeploymentResultToKotlin(getDeploymentPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy