All Downloads are FREE. Search and download functionalities are using the official Maven repository.
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.notificationhub.kotlin.NotificationhubFunctions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.notificationhub.kotlin
import com.pulumi.azure.notificationhub.NotificationhubFunctions.getHubPlain
import com.pulumi.azure.notificationhub.NotificationhubFunctions.getNamespacePlain
import com.pulumi.azure.notificationhub.kotlin.inputs.GetHubPlainArgs
import com.pulumi.azure.notificationhub.kotlin.inputs.GetHubPlainArgsBuilder
import com.pulumi.azure.notificationhub.kotlin.inputs.GetNamespacePlainArgs
import com.pulumi.azure.notificationhub.kotlin.inputs.GetNamespacePlainArgsBuilder
import com.pulumi.azure.notificationhub.kotlin.outputs.GetHubResult
import com.pulumi.azure.notificationhub.kotlin.outputs.GetNamespaceResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.notificationhub.kotlin.outputs.GetHubResult.Companion.toKotlin as getHubResultToKotlin
import com.pulumi.azure.notificationhub.kotlin.outputs.GetNamespaceResult.Companion.toKotlin as getNamespaceResultToKotlin
public object NotificationhubFunctions {
/**
* Use this data source to access information about an existing Notification Hub within a Notification Hub Namespace.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.notificationhub.getHub({
* name: "notification-hub",
* namespaceName: "namespace-name",
* resourceGroupName: "resource-group-name",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.notificationhub.get_hub(name="notification-hub",
* namespace_name="namespace-name",
* resource_group_name="resource-group-name")
* 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.NotificationHub.GetHub.Invoke(new()
* {
* Name = "notification-hub",
* NamespaceName = "namespace-name",
* ResourceGroupName = "resource-group-name",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getHubResult => getHubResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/notificationhub"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := notificationhub.LookupHub(ctx, ¬ificationhub.LookupHubArgs{
* Name: "notification-hub",
* NamespaceName: "namespace-name",
* ResourceGroupName: "resource-group-name",
* }, 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.notificationhub.NotificationhubFunctions;
* import com.pulumi.azure.notificationhub.inputs.GetHubArgs;
* 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 = NotificationhubFunctions.getHub(GetHubArgs.builder()
* .name("notification-hub")
* .namespaceName("namespace-name")
* .resourceGroupName("resource-group-name")
* .build());
* ctx.export("id", example.applyValue(getHubResult -> getHubResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:notificationhub:getHub
* Arguments:
* name: notification-hub
* namespaceName: namespace-name
* resourceGroupName: resource-group-name
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getHub.
* @return A collection of values returned by getHub.
*/
public suspend fun getHub(argument: GetHubPlainArgs): GetHubResult =
getHubResultToKotlin(getHubPlain(argument.toJava()).await())
/**
* @see [getHub].
* @param name Specifies the Name of the Notification Hub.
* @param namespaceName Specifies the Name of the Notification Hub Namespace which contains the Notification Hub.
* @param resourceGroupName Specifies the Name of the Resource Group within which the Notification Hub exists.
* @return A collection of values returned by getHub.
*/
public suspend fun getHub(
name: String,
namespaceName: String,
resourceGroupName: String,
): GetHubResult {
val argument = GetHubPlainArgs(
name = name,
namespaceName = namespaceName,
resourceGroupName = resourceGroupName,
)
return getHubResultToKotlin(getHubPlain(argument.toJava()).await())
}
/**
* @see [getHub].
* @param argument Builder for [com.pulumi.azure.notificationhub.kotlin.inputs.GetHubPlainArgs].
* @return A collection of values returned by getHub.
*/
public suspend fun getHub(argument: suspend GetHubPlainArgsBuilder.() -> Unit): GetHubResult {
val builder = GetHubPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getHubResultToKotlin(getHubPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing Notification Hub Namespace.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.notificationhub.getNamespace({
* name: "my-namespace",
* resourceGroupName: "my-resource-group",
* });
* export const servicebusEndpoint = example.then(example => example.servicebusEndpoint);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.notificationhub.get_namespace(name="my-namespace",
* resource_group_name="my-resource-group")
* pulumi.export("servicebusEndpoint", example.servicebus_endpoint)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.NotificationHub.GetNamespace.Invoke(new()
* {
* Name = "my-namespace",
* ResourceGroupName = "my-resource-group",
* });
* return new Dictionary
* {
* ["servicebusEndpoint"] = example.Apply(getNamespaceResult => getNamespaceResult.ServicebusEndpoint),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/notificationhub"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := notificationhub.LookupNamespace(ctx, ¬ificationhub.LookupNamespaceArgs{
* Name: "my-namespace",
* ResourceGroupName: "my-resource-group",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("servicebusEndpoint", example.ServicebusEndpoint)
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.notificationhub.NotificationhubFunctions;
* import com.pulumi.azure.notificationhub.inputs.GetNamespaceArgs;
* 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 = NotificationhubFunctions.getNamespace(GetNamespaceArgs.builder()
* .name("my-namespace")
* .resourceGroupName("my-resource-group")
* .build());
* ctx.export("servicebusEndpoint", example.applyValue(getNamespaceResult -> getNamespaceResult.servicebusEndpoint()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:notificationhub:getNamespace
* Arguments:
* name: my-namespace
* resourceGroupName: my-resource-group
* outputs:
* servicebusEndpoint: ${example.servicebusEndpoint}
* ```
*
* @param argument A collection of arguments for invoking getNamespace.
* @return A collection of values returned by getNamespace.
*/
public suspend fun getNamespace(argument: GetNamespacePlainArgs): GetNamespaceResult =
getNamespaceResultToKotlin(getNamespacePlain(argument.toJava()).await())
/**
* @see [getNamespace].
* @param name Specifies the Name of the Notification Hub Namespace.
* @param resourceGroupName Specifies the Name of the Resource Group within which the Notification Hub exists.
* @return A collection of values returned by getNamespace.
*/
public suspend fun getNamespace(name: String, resourceGroupName: String): GetNamespaceResult {
val argument = GetNamespacePlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getNamespaceResultToKotlin(getNamespacePlain(argument.toJava()).await())
}
/**
* @see [getNamespace].
* @param argument Builder for [com.pulumi.azure.notificationhub.kotlin.inputs.GetNamespacePlainArgs].
* @return A collection of values returned by getNamespace.
*/
public suspend fun getNamespace(argument: suspend GetNamespacePlainArgsBuilder.() -> Unit): GetNamespaceResult {
val builder = GetNamespacePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getNamespaceResultToKotlin(getNamespacePlain(builtArgument.toJava()).await())
}
}