com.pulumi.gcp.dataproc.kotlin.DataprocFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.dataproc.kotlin
import com.pulumi.gcp.dataproc.DataprocFunctions.getAutoscalingPolicyIamPolicyPlain
import com.pulumi.gcp.dataproc.DataprocFunctions.getClusterIamPolicyPlain
import com.pulumi.gcp.dataproc.DataprocFunctions.getJobIamPolicyPlain
import com.pulumi.gcp.dataproc.DataprocFunctions.getMetastoreFederationIamPolicyPlain
import com.pulumi.gcp.dataproc.DataprocFunctions.getMetastoreServiceIamPolicyPlain
import com.pulumi.gcp.dataproc.DataprocFunctions.getMetastoreServicePlain
import com.pulumi.gcp.dataproc.kotlin.inputs.GetAutoscalingPolicyIamPolicyPlainArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.GetAutoscalingPolicyIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataproc.kotlin.inputs.GetClusterIamPolicyPlainArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.GetClusterIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataproc.kotlin.inputs.GetJobIamPolicyPlainArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.GetJobIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreFederationIamPolicyPlainArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreFederationIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreServiceIamPolicyPlainArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreServiceIamPolicyPlainArgsBuilder
import com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreServicePlainArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreServicePlainArgsBuilder
import com.pulumi.gcp.dataproc.kotlin.outputs.GetAutoscalingPolicyIamPolicyResult
import com.pulumi.gcp.dataproc.kotlin.outputs.GetClusterIamPolicyResult
import com.pulumi.gcp.dataproc.kotlin.outputs.GetJobIamPolicyResult
import com.pulumi.gcp.dataproc.kotlin.outputs.GetMetastoreFederationIamPolicyResult
import com.pulumi.gcp.dataproc.kotlin.outputs.GetMetastoreServiceIamPolicyResult
import com.pulumi.gcp.dataproc.kotlin.outputs.GetMetastoreServiceResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.dataproc.kotlin.outputs.GetAutoscalingPolicyIamPolicyResult.Companion.toKotlin as getAutoscalingPolicyIamPolicyResultToKotlin
import com.pulumi.gcp.dataproc.kotlin.outputs.GetClusterIamPolicyResult.Companion.toKotlin as getClusterIamPolicyResultToKotlin
import com.pulumi.gcp.dataproc.kotlin.outputs.GetJobIamPolicyResult.Companion.toKotlin as getJobIamPolicyResultToKotlin
import com.pulumi.gcp.dataproc.kotlin.outputs.GetMetastoreFederationIamPolicyResult.Companion.toKotlin as getMetastoreFederationIamPolicyResultToKotlin
import com.pulumi.gcp.dataproc.kotlin.outputs.GetMetastoreServiceIamPolicyResult.Companion.toKotlin as getMetastoreServiceIamPolicyResultToKotlin
import com.pulumi.gcp.dataproc.kotlin.outputs.GetMetastoreServiceResult.Companion.toKotlin as getMetastoreServiceResultToKotlin
public object DataprocFunctions {
/**
* Retrieves the current IAM policy data for autoscalingpolicy
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.dataproc.getAutoscalingPolicyIamPolicy({
* project: basic.project,
* location: basic.location,
* policyId: basic.policyId,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.dataproc.get_autoscaling_policy_iam_policy(project=basic["project"],
* location=basic["location"],
* policy_id=basic["policyId"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.Dataproc.GetAutoscalingPolicyIamPolicy.Invoke(new()
* {
* Project = basic.Project,
* Location = basic.Location,
* PolicyId = basic.PolicyId,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dataproc.LookupAutoscalingPolicyIamPolicy(ctx, &dataproc.LookupAutoscalingPolicyIamPolicyArgs{
* Project: pulumi.StringRef(basic.Project),
* Location: pulumi.StringRef(basic.Location),
* PolicyId: basic.PolicyId,
* }, 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.dataproc.DataprocFunctions;
* import com.pulumi.gcp.dataproc.inputs.GetAutoscalingPolicyIamPolicyArgs;
* 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 = DataprocFunctions.getAutoscalingPolicyIamPolicy(GetAutoscalingPolicyIamPolicyArgs.builder()
* .project(basic.project())
* .location(basic.location())
* .policyId(basic.policyId())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:dataproc:getAutoscalingPolicyIamPolicy
* Arguments:
* project: ${basic.project}
* location: ${basic.location}
* policyId: ${basic.policyId}
* ```
*
* @param argument A collection of arguments for invoking getAutoscalingPolicyIamPolicy.
* @return A collection of values returned by getAutoscalingPolicyIamPolicy.
*/
public suspend fun getAutoscalingPolicyIamPolicy(argument: GetAutoscalingPolicyIamPolicyPlainArgs): GetAutoscalingPolicyIamPolicyResult =
getAutoscalingPolicyIamPolicyResultToKotlin(getAutoscalingPolicyIamPolicyPlain(argument.toJava()).await())
/**
* @see [getAutoscalingPolicyIamPolicy].
* @param location The location where the autoscaling policy should reside.
* The default value is `global`.
* Used to find the parent resource to bind the IAM policy to
* @param policyId The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
* and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
* 3 and 50 characters.
* 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 getAutoscalingPolicyIamPolicy.
*/
public suspend fun getAutoscalingPolicyIamPolicy(
location: String? = null,
policyId: String,
project: String? = null,
): GetAutoscalingPolicyIamPolicyResult {
val argument = GetAutoscalingPolicyIamPolicyPlainArgs(
location = location,
policyId = policyId,
project = project,
)
return getAutoscalingPolicyIamPolicyResultToKotlin(getAutoscalingPolicyIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getAutoscalingPolicyIamPolicy].
* @param argument Builder for [com.pulumi.gcp.dataproc.kotlin.inputs.GetAutoscalingPolicyIamPolicyPlainArgs].
* @return A collection of values returned by getAutoscalingPolicyIamPolicy.
*/
public suspend fun getAutoscalingPolicyIamPolicy(argument: suspend GetAutoscalingPolicyIamPolicyPlainArgsBuilder.() -> Unit): GetAutoscalingPolicyIamPolicyResult {
val builder = GetAutoscalingPolicyIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAutoscalingPolicyIamPolicyResultToKotlin(getAutoscalingPolicyIamPolicyPlain(builtArgument.toJava()).await())
}
/**
* Retrieves the current IAM policy data for a Dataproc cluster.
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.dataproc.getClusterIamPolicy({
* cluster: cluster.name,
* region: "us-central1",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.dataproc.get_cluster_iam_policy(cluster=cluster["name"],
* region="us-central1")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.Dataproc.GetClusterIamPolicy.Invoke(new()
* {
* Cluster = cluster.Name,
* Region = "us-central1",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dataproc.GetClusterIamPolicy(ctx, &dataproc.GetClusterIamPolicyArgs{
* Cluster: cluster.Name,
* Region: pulumi.StringRef("us-central1"),
* }, 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.dataproc.DataprocFunctions;
* import com.pulumi.gcp.dataproc.inputs.GetClusterIamPolicyArgs;
* 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 = DataprocFunctions.getClusterIamPolicy(GetClusterIamPolicyArgs.builder()
* .cluster(cluster.name())
* .region("us-central1")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:dataproc:getClusterIamPolicy
* Arguments:
* cluster: ${cluster.name}
* region: us-central1
* ```
*
* @param argument A collection of arguments for invoking getClusterIamPolicy.
* @return A collection of values returned by getClusterIamPolicy.
*/
public suspend fun getClusterIamPolicy(argument: GetClusterIamPolicyPlainArgs): GetClusterIamPolicyResult =
getClusterIamPolicyResultToKotlin(getClusterIamPolicyPlain(argument.toJava()).await())
/**
* @see [getClusterIamPolicy].
* @param cluster The name or relative resource id of the cluster to manage IAM policies for.
* @param project
* @param region
* @return A collection of values returned by getClusterIamPolicy.
*/
public suspend fun getClusterIamPolicy(
cluster: String,
project: String? = null,
region: String? = null,
): GetClusterIamPolicyResult {
val argument = GetClusterIamPolicyPlainArgs(
cluster = cluster,
project = project,
region = region,
)
return getClusterIamPolicyResultToKotlin(getClusterIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getClusterIamPolicy].
* @param argument Builder for [com.pulumi.gcp.dataproc.kotlin.inputs.GetClusterIamPolicyPlainArgs].
* @return A collection of values returned by getClusterIamPolicy.
*/
public suspend fun getClusterIamPolicy(argument: suspend GetClusterIamPolicyPlainArgsBuilder.() -> Unit): GetClusterIamPolicyResult {
val builder = GetClusterIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getClusterIamPolicyResultToKotlin(getClusterIamPolicyPlain(builtArgument.toJava()).await())
}
/**
* Retrieves the current IAM policy data for a Dataproc job.
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.dataproc.getJobIamPolicy({
* jobId: pyspark.reference[0].jobId,
* region: "us-central1",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.dataproc.get_job_iam_policy(job_id=pyspark["reference"][0]["jobId"],
* region="us-central1")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.Dataproc.GetJobIamPolicy.Invoke(new()
* {
* JobId = pyspark.Reference[0].JobId,
* Region = "us-central1",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dataproc.GetJobIamPolicy(ctx, &dataproc.GetJobIamPolicyArgs{
* JobId: pyspark.Reference[0].JobId,
* Region: pulumi.StringRef("us-central1"),
* }, 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.dataproc.DataprocFunctions;
* import com.pulumi.gcp.dataproc.inputs.GetJobIamPolicyArgs;
* 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 = DataprocFunctions.getJobIamPolicy(GetJobIamPolicyArgs.builder()
* .jobId(pyspark.reference()[0].jobId())
* .region("us-central1")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:dataproc:getJobIamPolicy
* Arguments:
* jobId: ${pyspark.reference[0].jobId}
* region: us-central1
* ```
*
* @param argument A collection of arguments for invoking getJobIamPolicy.
* @return A collection of values returned by getJobIamPolicy.
*/
public suspend fun getJobIamPolicy(argument: GetJobIamPolicyPlainArgs): GetJobIamPolicyResult =
getJobIamPolicyResultToKotlin(getJobIamPolicyPlain(argument.toJava()).await())
/**
* @see [getJobIamPolicy].
* @param jobId The name or relative resource id of the job to manage IAM policies for.
* @param project
* @param region
* @return A collection of values returned by getJobIamPolicy.
*/
public suspend fun getJobIamPolicy(
jobId: String,
project: String? = null,
region: String? = null,
): GetJobIamPolicyResult {
val argument = GetJobIamPolicyPlainArgs(
jobId = jobId,
project = project,
region = region,
)
return getJobIamPolicyResultToKotlin(getJobIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getJobIamPolicy].
* @param argument Builder for [com.pulumi.gcp.dataproc.kotlin.inputs.GetJobIamPolicyPlainArgs].
* @return A collection of values returned by getJobIamPolicy.
*/
public suspend fun getJobIamPolicy(argument: suspend GetJobIamPolicyPlainArgsBuilder.() -> Unit): GetJobIamPolicyResult {
val builder = GetJobIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getJobIamPolicyResultToKotlin(getJobIamPolicyPlain(builtArgument.toJava()).await())
}
/**
* Retrieves the current IAM policy data for federation
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.dataproc.getMetastoreFederationIamPolicy({
* project: _default.project,
* location: _default.location,
* federationId: _default.federationId,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.dataproc.get_metastore_federation_iam_policy(project=default["project"],
* location=default["location"],
* federation_id=default["federationId"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.Dataproc.GetMetastoreFederationIamPolicy.Invoke(new()
* {
* Project = @default.Project,
* Location = @default.Location,
* FederationId = @default.FederationId,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dataproc.LookupMetastoreFederationIamPolicy(ctx, &dataproc.LookupMetastoreFederationIamPolicyArgs{
* Project: pulumi.StringRef(_default.Project),
* Location: pulumi.StringRef(_default.Location),
* FederationId: _default.FederationId,
* }, 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.dataproc.DataprocFunctions;
* import com.pulumi.gcp.dataproc.inputs.GetMetastoreFederationIamPolicyArgs;
* 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 = DataprocFunctions.getMetastoreFederationIamPolicy(GetMetastoreFederationIamPolicyArgs.builder()
* .project(default_.project())
* .location(default_.location())
* .federationId(default_.federationId())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:dataproc:getMetastoreFederationIamPolicy
* Arguments:
* project: ${default.project}
* location: ${default.location}
* federationId: ${default.federationId}
* ```
*
* @param argument A collection of arguments for invoking getMetastoreFederationIamPolicy.
* @return A collection of values returned by getMetastoreFederationIamPolicy.
*/
public suspend fun getMetastoreFederationIamPolicy(argument: GetMetastoreFederationIamPolicyPlainArgs): GetMetastoreFederationIamPolicyResult =
getMetastoreFederationIamPolicyResultToKotlin(getMetastoreFederationIamPolicyPlain(argument.toJava()).await())
/**
* @see [getMetastoreFederationIamPolicy].
* @param federationId
* @param location The location where the metastore federation 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 getMetastoreFederationIamPolicy.
*/
public suspend fun getMetastoreFederationIamPolicy(
federationId: String,
location: String? = null,
project: String? = null,
): GetMetastoreFederationIamPolicyResult {
val argument = GetMetastoreFederationIamPolicyPlainArgs(
federationId = federationId,
location = location,
project = project,
)
return getMetastoreFederationIamPolicyResultToKotlin(getMetastoreFederationIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getMetastoreFederationIamPolicy].
* @param argument Builder for [com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreFederationIamPolicyPlainArgs].
* @return A collection of values returned by getMetastoreFederationIamPolicy.
*/
public suspend fun getMetastoreFederationIamPolicy(argument: suspend GetMetastoreFederationIamPolicyPlainArgsBuilder.() -> Unit): GetMetastoreFederationIamPolicyResult {
val builder = GetMetastoreFederationIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMetastoreFederationIamPolicyResultToKotlin(getMetastoreFederationIamPolicyPlain(builtArgument.toJava()).await())
}
/**
* Get a Dataproc Metastore service from Google Cloud by its id and location.
* ## Example Usage
* ```tf
* data "google_dataproc_metastore_service" "foo" {
* service_id = "foo-bar"
* location = "global"
* }
* ```
* @param argument A collection of arguments for invoking getMetastoreService.
* @return A collection of values returned by getMetastoreService.
*/
public suspend fun getMetastoreService(argument: GetMetastoreServicePlainArgs): GetMetastoreServiceResult =
getMetastoreServiceResultToKotlin(getMetastoreServicePlain(argument.toJava()).await())
/**
* @see [getMetastoreService].
* @param location The location where the metastore service resides.
* - - -
* @param project The project in which the resource belongs. If it
* is not provided, the provider project is used.
* @param serviceId The ID of the metastore service.
* @return A collection of values returned by getMetastoreService.
*/
public suspend fun getMetastoreService(
location: String,
project: String? = null,
serviceId: String,
): GetMetastoreServiceResult {
val argument = GetMetastoreServicePlainArgs(
location = location,
project = project,
serviceId = serviceId,
)
return getMetastoreServiceResultToKotlin(getMetastoreServicePlain(argument.toJava()).await())
}
/**
* @see [getMetastoreService].
* @param argument Builder for [com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreServicePlainArgs].
* @return A collection of values returned by getMetastoreService.
*/
public suspend fun getMetastoreService(argument: suspend GetMetastoreServicePlainArgsBuilder.() -> Unit): GetMetastoreServiceResult {
val builder = GetMetastoreServicePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMetastoreServiceResultToKotlin(getMetastoreServicePlain(builtArgument.toJava()).await())
}
/**
* Retrieves the current IAM policy data for service
* ## example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = gcp.dataproc.getMetastoreServiceIamPolicy({
* project: _default.project,
* location: _default.location,
* serviceId: _default.serviceId,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.dataproc.get_metastore_service_iam_policy(project=default["project"],
* location=default["location"],
* service_id=default["serviceId"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = Gcp.Dataproc.GetMetastoreServiceIamPolicy.Invoke(new()
* {
* Project = @default.Project,
* Location = @default.Location,
* ServiceId = @default.ServiceId,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := dataproc.LookupMetastoreServiceIamPolicy(ctx, &dataproc.LookupMetastoreServiceIamPolicyArgs{
* Project: pulumi.StringRef(_default.Project),
* Location: pulumi.StringRef(_default.Location),
* ServiceId: _default.ServiceId,
* }, 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.dataproc.DataprocFunctions;
* import com.pulumi.gcp.dataproc.inputs.GetMetastoreServiceIamPolicyArgs;
* 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 = DataprocFunctions.getMetastoreServiceIamPolicy(GetMetastoreServiceIamPolicyArgs.builder()
* .project(default_.project())
* .location(default_.location())
* .serviceId(default_.serviceId())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: gcp:dataproc:getMetastoreServiceIamPolicy
* Arguments:
* project: ${default.project}
* location: ${default.location}
* serviceId: ${default.serviceId}
* ```
*
* @param argument A collection of arguments for invoking getMetastoreServiceIamPolicy.
* @return A collection of values returned by getMetastoreServiceIamPolicy.
*/
public suspend fun getMetastoreServiceIamPolicy(argument: GetMetastoreServiceIamPolicyPlainArgs): GetMetastoreServiceIamPolicyResult =
getMetastoreServiceIamPolicyResultToKotlin(getMetastoreServiceIamPolicyPlain(argument.toJava()).await())
/**
* @see [getMetastoreServiceIamPolicy].
* @param location The location where the metastore service should reside.
* The default value is `global`.
* 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 serviceId
* @return A collection of values returned by getMetastoreServiceIamPolicy.
*/
public suspend fun getMetastoreServiceIamPolicy(
location: String? = null,
project: String? = null,
serviceId: String,
): GetMetastoreServiceIamPolicyResult {
val argument = GetMetastoreServiceIamPolicyPlainArgs(
location = location,
project = project,
serviceId = serviceId,
)
return getMetastoreServiceIamPolicyResultToKotlin(getMetastoreServiceIamPolicyPlain(argument.toJava()).await())
}
/**
* @see [getMetastoreServiceIamPolicy].
* @param argument Builder for [com.pulumi.gcp.dataproc.kotlin.inputs.GetMetastoreServiceIamPolicyPlainArgs].
* @return A collection of values returned by getMetastoreServiceIamPolicy.
*/
public suspend fun getMetastoreServiceIamPolicy(argument: suspend GetMetastoreServiceIamPolicyPlainArgsBuilder.() -> Unit): GetMetastoreServiceIamPolicyResult {
val builder = GetMetastoreServiceIamPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getMetastoreServiceIamPolicyResultToKotlin(getMetastoreServiceIamPolicyPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy