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

com.pulumi.gcp.bigqueryanalyticshub.kotlin.BigqueryanalyticshubFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.bigqueryanalyticshub.kotlin

import com.pulumi.gcp.bigqueryanalyticshub.BigqueryanalyticshubFunctions.getDataExchangeIamPolicyPlain
import com.pulumi.gcp.bigqueryanalyticshub.BigqueryanalyticshubFunctions.getListingIamPolicyPlain
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.inputs.GetDataExchangeIamPolicyPlainArgs
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.inputs.GetDataExchangeIamPolicyPlainArgsBuilder
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.inputs.GetListingIamPolicyPlainArgs
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.inputs.GetListingIamPolicyPlainArgsBuilder
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.outputs.GetDataExchangeIamPolicyResult
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.outputs.GetListingIamPolicyResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.outputs.GetDataExchangeIamPolicyResult.Companion.toKotlin as getDataExchangeIamPolicyResultToKotlin
import com.pulumi.gcp.bigqueryanalyticshub.kotlin.outputs.GetListingIamPolicyResult.Companion.toKotlin as getListingIamPolicyResultToKotlin

public object BigqueryanalyticshubFunctions {
    /**
     * Retrieves the current IAM policy data for dataexchange
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.bigqueryanalyticshub.getDataExchangeIamPolicy({
     *     project: dataExchange.project,
     *     location: dataExchange.location,
     *     dataExchangeId: dataExchange.dataExchangeId,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.bigqueryanalyticshub.get_data_exchange_iam_policy(project=data_exchange["project"],
     *     location=data_exchange["location"],
     *     data_exchange_id=data_exchange["dataExchangeId"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.BigQueryAnalyticsHub.GetDataExchangeIamPolicy.Invoke(new()
     *     {
     *         Project = dataExchange.Project,
     *         Location = dataExchange.Location,
     *         DataExchangeId = dataExchange.DataExchangeId,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigqueryanalyticshub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := bigqueryanalyticshub.LookupDataExchangeIamPolicy(ctx, &bigqueryanalyticshub.LookupDataExchangeIamPolicyArgs{
     * 			Project:        pulumi.StringRef(dataExchange.Project),
     * 			Location:       pulumi.StringRef(dataExchange.Location),
     * 			DataExchangeId: dataExchange.DataExchangeId,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.gcp.bigqueryanalyticshub.BigqueryanalyticshubFunctions;
     * import com.pulumi.gcp.bigqueryanalyticshub.inputs.GetDataExchangeIamPolicyArgs;
     * 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 policy = BigqueryanalyticshubFunctions.getDataExchangeIamPolicy(GetDataExchangeIamPolicyArgs.builder()
     *             .project(dataExchange.project())
     *             .location(dataExchange.location())
     *             .dataExchangeId(dataExchange.dataExchangeId())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:bigqueryanalyticshub:getDataExchangeIamPolicy
     *       Arguments:
     *         project: ${dataExchange.project}
     *         location: ${dataExchange.location}
     *         dataExchangeId: ${dataExchange.dataExchangeId}
     * ```
     * 
     * @param argument A collection of arguments for invoking getDataExchangeIamPolicy.
     * @return A collection of values returned by getDataExchangeIamPolicy.
     */
    public suspend fun getDataExchangeIamPolicy(argument: GetDataExchangeIamPolicyPlainArgs): GetDataExchangeIamPolicyResult =
        getDataExchangeIamPolicyResultToKotlin(getDataExchangeIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getDataExchangeIamPolicy].
     * @param dataExchangeId The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Used to find the parent resource to bind the IAM policy to
     * @param location The name of the location this data exchange.
     * Used to find the parent resource to bind the IAM policy to
     * @param project The ID of the project in which the resource belongs.
     * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
     * @return A collection of values returned by getDataExchangeIamPolicy.
     */
    public suspend fun getDataExchangeIamPolicy(
        dataExchangeId: String,
        location: String? = null,
        project: String? = null,
    ): GetDataExchangeIamPolicyResult {
        val argument = GetDataExchangeIamPolicyPlainArgs(
            dataExchangeId = dataExchangeId,
            location = location,
            project = project,
        )
        return getDataExchangeIamPolicyResultToKotlin(getDataExchangeIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getDataExchangeIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.bigqueryanalyticshub.kotlin.inputs.GetDataExchangeIamPolicyPlainArgs].
     * @return A collection of values returned by getDataExchangeIamPolicy.
     */
    public suspend fun getDataExchangeIamPolicy(argument: suspend GetDataExchangeIamPolicyPlainArgsBuilder.() -> Unit): GetDataExchangeIamPolicyResult {
        val builder = GetDataExchangeIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDataExchangeIamPolicyResultToKotlin(getDataExchangeIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for listing
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.bigqueryanalyticshub.getListingIamPolicy({
     *     project: listing.project,
     *     location: listing.location,
     *     dataExchangeId: listing.dataExchangeId,
     *     listingId: listing.listingId,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.bigqueryanalyticshub.get_listing_iam_policy(project=listing["project"],
     *     location=listing["location"],
     *     data_exchange_id=listing["dataExchangeId"],
     *     listing_id=listing["listingId"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.BigQueryAnalyticsHub.GetListingIamPolicy.Invoke(new()
     *     {
     *         Project = listing.Project,
     *         Location = listing.Location,
     *         DataExchangeId = listing.DataExchangeId,
     *         ListingId = listing.ListingId,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigqueryanalyticshub"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := bigqueryanalyticshub.LookupListingIamPolicy(ctx, &bigqueryanalyticshub.LookupListingIamPolicyArgs{
     * 			Project:        pulumi.StringRef(listing.Project),
     * 			Location:       pulumi.StringRef(listing.Location),
     * 			DataExchangeId: listing.DataExchangeId,
     * 			ListingId:      listing.ListingId,
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.gcp.bigqueryanalyticshub.BigqueryanalyticshubFunctions;
     * import com.pulumi.gcp.bigqueryanalyticshub.inputs.GetListingIamPolicyArgs;
     * 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 policy = BigqueryanalyticshubFunctions.getListingIamPolicy(GetListingIamPolicyArgs.builder()
     *             .project(listing.project())
     *             .location(listing.location())
     *             .dataExchangeId(listing.dataExchangeId())
     *             .listingId(listing.listingId())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:bigqueryanalyticshub:getListingIamPolicy
     *       Arguments:
     *         project: ${listing.project}
     *         location: ${listing.location}
     *         dataExchangeId: ${listing.dataExchangeId}
     *         listingId: ${listing.listingId}
     * ```
     * 
     * @param argument A collection of arguments for invoking getListingIamPolicy.
     * @return A collection of values returned by getListingIamPolicy.
     */
    public suspend fun getListingIamPolicy(argument: GetListingIamPolicyPlainArgs): GetListingIamPolicyResult =
        getListingIamPolicyResultToKotlin(getListingIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getListingIamPolicy].
     * @param dataExchangeId The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Used to find the parent resource to bind the IAM policy to
     * @param listingId The ID of the listing. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces. Used to find the parent resource to bind the IAM policy to
     * @param location The name of the location this data exchange listing.
     * Used to find the parent resource to bind the IAM policy to
     * @param project The ID of the project in which the resource belongs.
     * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
     * @return A collection of values returned by getListingIamPolicy.
     */
    public suspend fun getListingIamPolicy(
        dataExchangeId: String,
        listingId: String,
        location: String? = null,
        project: String? = null,
    ): GetListingIamPolicyResult {
        val argument = GetListingIamPolicyPlainArgs(
            dataExchangeId = dataExchangeId,
            listingId = listingId,
            location = location,
            project = project,
        )
        return getListingIamPolicyResultToKotlin(getListingIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getListingIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.bigqueryanalyticshub.kotlin.inputs.GetListingIamPolicyPlainArgs].
     * @return A collection of values returned by getListingIamPolicy.
     */
    public suspend fun getListingIamPolicy(argument: suspend GetListingIamPolicyPlainArgsBuilder.() -> Unit): GetListingIamPolicyResult {
        val builder = GetListingIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getListingIamPolicyResultToKotlin(getListingIamPolicyPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy