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

com.pulumi.gcp.dataplex.kotlin.DataplexFunctions.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.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.dataplex.kotlin

import com.pulumi.gcp.dataplex.DataplexFunctions.getAssetIamPolicyPlain
import com.pulumi.gcp.dataplex.DataplexFunctions.getDatascanIamPolicyPlain
import com.pulumi.gcp.dataplex.DataplexFunctions.getLakeIamPolicyPlain
import com.pulumi.gcp.dataplex.DataplexFunctions.getTaskIamPolicyPlain
import com.pulumi.gcp.dataplex.DataplexFunctions.getZoneIamPolicyPlain
import com.pulumi.gcp.dataplex.kotlin.inputs.GetAssetIamPolicyPlainArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.GetAssetIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataplex.kotlin.inputs.GetDatascanIamPolicyPlainArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.GetDatascanIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataplex.kotlin.inputs.GetLakeIamPolicyPlainArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.GetLakeIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataplex.kotlin.inputs.GetTaskIamPolicyPlainArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.GetTaskIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataplex.kotlin.inputs.GetZoneIamPolicyPlainArgs
import com.pulumi.gcp.dataplex.kotlin.inputs.GetZoneIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataplex.kotlin.outputs.GetAssetIamPolicyResult
import com.pulumi.gcp.dataplex.kotlin.outputs.GetDatascanIamPolicyResult
import com.pulumi.gcp.dataplex.kotlin.outputs.GetLakeIamPolicyResult
import com.pulumi.gcp.dataplex.kotlin.outputs.GetTaskIamPolicyResult
import com.pulumi.gcp.dataplex.kotlin.outputs.GetZoneIamPolicyResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.dataplex.kotlin.outputs.GetAssetIamPolicyResult.Companion.toKotlin as getAssetIamPolicyResultToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.GetDatascanIamPolicyResult.Companion.toKotlin as getDatascanIamPolicyResultToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.GetLakeIamPolicyResult.Companion.toKotlin as getLakeIamPolicyResultToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.GetTaskIamPolicyResult.Companion.toKotlin as getTaskIamPolicyResultToKotlin
import com.pulumi.gcp.dataplex.kotlin.outputs.GetZoneIamPolicyResult.Companion.toKotlin as getZoneIamPolicyResultToKotlin

public object DataplexFunctions {
    /**
     * Retrieves the current IAM policy data for asset
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.dataplex.getAssetIamPolicy({
     *     project: example.project,
     *     location: example.location,
     *     lake: example.lake,
     *     dataplexZone: example.dataplexZone,
     *     asset: example.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.dataplex.get_asset_iam_policy(project=example["project"],
     *     location=example["location"],
     *     lake=example["lake"],
     *     dataplex_zone=example["dataplexZone"],
     *     asset=example["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.DataPlex.GetAssetIamPolicy.Invoke(new()
     *     {
     *         Project = example.Project,
     *         Location = example.Location,
     *         Lake = example.Lake,
     *         DataplexZone = example.DataplexZone,
     *         Asset = example.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := dataplex.LookupAssetIamPolicy(ctx, &dataplex.LookupAssetIamPolicyArgs{
     * 			Project:      pulumi.StringRef(example.Project),
     * 			Location:     pulumi.StringRef(example.Location),
     * 			Lake:         example.Lake,
     * 			DataplexZone: example.DataplexZone,
     * 			Asset:        example.Name,
     * 		}, 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.dataplex.DataplexFunctions;
     * import com.pulumi.gcp.dataplex.inputs.GetAssetIamPolicyArgs;
     * 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 = DataplexFunctions.getAssetIamPolicy(GetAssetIamPolicyArgs.builder()
     *             .project(example.project())
     *             .location(example.location())
     *             .lake(example.lake())
     *             .dataplexZone(example.dataplexZone())
     *             .asset(example.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:dataplex:getAssetIamPolicy
     *       Arguments:
     *         project: ${example.project}
     *         location: ${example.location}
     *         lake: ${example.lake}
     *         dataplexZone: ${example.dataplexZone}
     *         asset: ${example.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getAssetIamPolicy.
     * @return A collection of values returned by getAssetIamPolicy.
     */
    public suspend fun getAssetIamPolicy(argument: GetAssetIamPolicyPlainArgs): GetAssetIamPolicyResult =
        getAssetIamPolicyResultToKotlin(getAssetIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getAssetIamPolicy].
     * @param asset Used to find the parent resource to bind the IAM policy to
     * @param dataplexZone
     * @param lake
     * @param location
     * @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 getAssetIamPolicy.
     */
    public suspend fun getAssetIamPolicy(
        asset: String,
        dataplexZone: String,
        lake: String,
        location: String? = null,
        project: String? = null,
    ): GetAssetIamPolicyResult {
        val argument = GetAssetIamPolicyPlainArgs(
            asset = asset,
            dataplexZone = dataplexZone,
            lake = lake,
            location = location,
            project = project,
        )
        return getAssetIamPolicyResultToKotlin(getAssetIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getAssetIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.dataplex.kotlin.inputs.GetAssetIamPolicyPlainArgs].
     * @return A collection of values returned by getAssetIamPolicy.
     */
    public suspend fun getAssetIamPolicy(argument: suspend GetAssetIamPolicyPlainArgsBuilder.() -> Unit): GetAssetIamPolicyResult {
        val builder = GetAssetIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getAssetIamPolicyResultToKotlin(getAssetIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for datascan
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.dataplex.getDatascanIamPolicy({
     *     project: basicProfile.project,
     *     location: basicProfile.location,
     *     dataScanId: basicProfile.dataScanId,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.dataplex.get_datascan_iam_policy(project=basic_profile["project"],
     *     location=basic_profile["location"],
     *     data_scan_id=basic_profile["dataScanId"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.DataPlex.GetDatascanIamPolicy.Invoke(new()
     *     {
     *         Project = basicProfile.Project,
     *         Location = basicProfile.Location,
     *         DataScanId = basicProfile.DataScanId,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := dataplex.LookupDatascanIamPolicy(ctx, &dataplex.LookupDatascanIamPolicyArgs{
     * 			Project:    pulumi.StringRef(basicProfile.Project),
     * 			Location:   pulumi.StringRef(basicProfile.Location),
     * 			DataScanId: basicProfile.DataScanId,
     * 		}, 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.dataplex.DataplexFunctions;
     * import com.pulumi.gcp.dataplex.inputs.GetDatascanIamPolicyArgs;
     * 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 = DataplexFunctions.getDatascanIamPolicy(GetDatascanIamPolicyArgs.builder()
     *             .project(basicProfile.project())
     *             .location(basicProfile.location())
     *             .dataScanId(basicProfile.dataScanId())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:dataplex:getDatascanIamPolicy
     *       Arguments:
     *         project: ${basicProfile.project}
     *         location: ${basicProfile.location}
     *         dataScanId: ${basicProfile.dataScanId}
     * ```
     * 
     * @param argument A collection of arguments for invoking getDatascanIamPolicy.
     * @return A collection of values returned by getDatascanIamPolicy.
     */
    public suspend fun getDatascanIamPolicy(argument: GetDatascanIamPolicyPlainArgs): GetDatascanIamPolicyResult =
        getDatascanIamPolicyResultToKotlin(getDatascanIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getDatascanIamPolicy].
     * @param dataScanId
     * @param location The location where the data scan should reside.
     * 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 getDatascanIamPolicy.
     */
    public suspend fun getDatascanIamPolicy(
        dataScanId: String,
        location: String? = null,
        project: String? = null,
    ): GetDatascanIamPolicyResult {
        val argument = GetDatascanIamPolicyPlainArgs(
            dataScanId = dataScanId,
            location = location,
            project = project,
        )
        return getDatascanIamPolicyResultToKotlin(getDatascanIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getDatascanIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.dataplex.kotlin.inputs.GetDatascanIamPolicyPlainArgs].
     * @return A collection of values returned by getDatascanIamPolicy.
     */
    public suspend fun getDatascanIamPolicy(argument: suspend GetDatascanIamPolicyPlainArgsBuilder.() -> Unit): GetDatascanIamPolicyResult {
        val builder = GetDatascanIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDatascanIamPolicyResultToKotlin(getDatascanIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for lake
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.dataplex.getLakeIamPolicy({
     *     project: example.project,
     *     location: example.location,
     *     lake: example.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.dataplex.get_lake_iam_policy(project=example["project"],
     *     location=example["location"],
     *     lake=example["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.DataPlex.GetLakeIamPolicy.Invoke(new()
     *     {
     *         Project = example.Project,
     *         Location = example.Location,
     *         Lake = example.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := dataplex.LookupLakeIamPolicy(ctx, &dataplex.LookupLakeIamPolicyArgs{
     * 			Project:  pulumi.StringRef(example.Project),
     * 			Location: pulumi.StringRef(example.Location),
     * 			Lake:     example.Name,
     * 		}, 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.dataplex.DataplexFunctions;
     * import com.pulumi.gcp.dataplex.inputs.GetLakeIamPolicyArgs;
     * 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 = DataplexFunctions.getLakeIamPolicy(GetLakeIamPolicyArgs.builder()
     *             .project(example.project())
     *             .location(example.location())
     *             .lake(example.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:dataplex:getLakeIamPolicy
     *       Arguments:
     *         project: ${example.project}
     *         location: ${example.location}
     *         lake: ${example.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getLakeIamPolicy.
     * @return A collection of values returned by getLakeIamPolicy.
     */
    public suspend fun getLakeIamPolicy(argument: GetLakeIamPolicyPlainArgs): GetLakeIamPolicyResult =
        getLakeIamPolicyResultToKotlin(getLakeIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getLakeIamPolicy].
     * @param lake Used to find the parent resource to bind the IAM policy to
     * @param location
     * @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 getLakeIamPolicy.
     */
    public suspend fun getLakeIamPolicy(
        lake: String,
        location: String? = null,
        project: String? = null,
    ): GetLakeIamPolicyResult {
        val argument = GetLakeIamPolicyPlainArgs(
            lake = lake,
            location = location,
            project = project,
        )
        return getLakeIamPolicyResultToKotlin(getLakeIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getLakeIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.dataplex.kotlin.inputs.GetLakeIamPolicyPlainArgs].
     * @return A collection of values returned by getLakeIamPolicy.
     */
    public suspend fun getLakeIamPolicy(argument: suspend GetLakeIamPolicyPlainArgsBuilder.() -> Unit): GetLakeIamPolicyResult {
        val builder = GetLakeIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getLakeIamPolicyResultToKotlin(getLakeIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for task
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.dataplex.getTaskIamPolicy({
     *     project: example.project,
     *     location: example.location,
     *     lake: example.lake,
     *     taskId: example.taskId,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.dataplex.get_task_iam_policy(project=example["project"],
     *     location=example["location"],
     *     lake=example["lake"],
     *     task_id=example["taskId"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.DataPlex.GetTaskIamPolicy.Invoke(new()
     *     {
     *         Project = example.Project,
     *         Location = example.Location,
     *         Lake = example.Lake,
     *         TaskId = example.TaskId,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := dataplex.LookupTaskIamPolicy(ctx, &dataplex.LookupTaskIamPolicyArgs{
     * 			Project:  pulumi.StringRef(example.Project),
     * 			Location: pulumi.StringRef(example.Location),
     * 			Lake:     example.Lake,
     * 			TaskId:   example.TaskId,
     * 		}, 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.dataplex.DataplexFunctions;
     * import com.pulumi.gcp.dataplex.inputs.GetTaskIamPolicyArgs;
     * 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 = DataplexFunctions.getTaskIamPolicy(GetTaskIamPolicyArgs.builder()
     *             .project(example.project())
     *             .location(example.location())
     *             .lake(example.lake())
     *             .taskId(example.taskId())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:dataplex:getTaskIamPolicy
     *       Arguments:
     *         project: ${example.project}
     *         location: ${example.location}
     *         lake: ${example.lake}
     *         taskId: ${example.taskId}
     * ```
     * 
     * @param argument A collection of arguments for invoking getTaskIamPolicy.
     * @return A collection of values returned by getTaskIamPolicy.
     */
    public suspend fun getTaskIamPolicy(argument: GetTaskIamPolicyPlainArgs): GetTaskIamPolicyResult =
        getTaskIamPolicyResultToKotlin(getTaskIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getTaskIamPolicy].
     * @param lake The lake in which the task will be created in.
     * Used to find the parent resource to bind the IAM policy to
     * @param location The location in which the task will be created in.
     * 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.
     * @param taskId
     * @return A collection of values returned by getTaskIamPolicy.
     */
    public suspend fun getTaskIamPolicy(
        lake: String,
        location: String? = null,
        project: String? = null,
        taskId: String,
    ): GetTaskIamPolicyResult {
        val argument = GetTaskIamPolicyPlainArgs(
            lake = lake,
            location = location,
            project = project,
            taskId = taskId,
        )
        return getTaskIamPolicyResultToKotlin(getTaskIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getTaskIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.dataplex.kotlin.inputs.GetTaskIamPolicyPlainArgs].
     * @return A collection of values returned by getTaskIamPolicy.
     */
    public suspend fun getTaskIamPolicy(argument: suspend GetTaskIamPolicyPlainArgsBuilder.() -> Unit): GetTaskIamPolicyResult {
        val builder = GetTaskIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getTaskIamPolicyResultToKotlin(getTaskIamPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Retrieves the current IAM policy data for zone
     * ## example
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const policy = gcp.dataplex.getZoneIamPolicy({
     *     project: example.project,
     *     location: example.location,
     *     lake: example.lake,
     *     dataplexZone: example.name,
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * policy = gcp.dataplex.get_zone_iam_policy(project=example["project"],
     *     location=example["location"],
     *     lake=example["lake"],
     *     dataplex_zone=example["name"])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var policy = Gcp.DataPlex.GetZoneIamPolicy.Invoke(new()
     *     {
     *         Project = example.Project,
     *         Location = example.Location,
     *         Lake = example.Lake,
     *         DataplexZone = example.Name,
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataplex"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := dataplex.LookupZoneIamPolicy(ctx, &dataplex.LookupZoneIamPolicyArgs{
     * 			Project:      pulumi.StringRef(example.Project),
     * 			Location:     pulumi.StringRef(example.Location),
     * 			Lake:         example.Lake,
     * 			DataplexZone: example.Name,
     * 		}, 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.dataplex.DataplexFunctions;
     * import com.pulumi.gcp.dataplex.inputs.GetZoneIamPolicyArgs;
     * 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 = DataplexFunctions.getZoneIamPolicy(GetZoneIamPolicyArgs.builder()
     *             .project(example.project())
     *             .location(example.location())
     *             .lake(example.lake())
     *             .dataplexZone(example.name())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   policy:
     *     fn::invoke:
     *       Function: gcp:dataplex:getZoneIamPolicy
     *       Arguments:
     *         project: ${example.project}
     *         location: ${example.location}
     *         lake: ${example.lake}
     *         dataplexZone: ${example.name}
     * ```
     * 
     * @param argument A collection of arguments for invoking getZoneIamPolicy.
     * @return A collection of values returned by getZoneIamPolicy.
     */
    public suspend fun getZoneIamPolicy(argument: GetZoneIamPolicyPlainArgs): GetZoneIamPolicyResult =
        getZoneIamPolicyResultToKotlin(getZoneIamPolicyPlain(argument.toJava()).await())

    /**
     * @see [getZoneIamPolicy].
     * @param dataplexZone Used to find the parent resource to bind the IAM policy to
     * @param lake
     * @param location
     * @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 getZoneIamPolicy.
     */
    public suspend fun getZoneIamPolicy(
        dataplexZone: String,
        lake: String,
        location: String? = null,
        project: String? = null,
    ): GetZoneIamPolicyResult {
        val argument = GetZoneIamPolicyPlainArgs(
            dataplexZone = dataplexZone,
            lake = lake,
            location = location,
            project = project,
        )
        return getZoneIamPolicyResultToKotlin(getZoneIamPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getZoneIamPolicy].
     * @param argument Builder for [com.pulumi.gcp.dataplex.kotlin.inputs.GetZoneIamPolicyPlainArgs].
     * @return A collection of values returned by getZoneIamPolicy.
     */
    public suspend fun getZoneIamPolicy(argument: suspend GetZoneIamPolicyPlainArgsBuilder.() -> Unit): GetZoneIamPolicyResult {
        val builder = GetZoneIamPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getZoneIamPolicyResultToKotlin(getZoneIamPolicyPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy