get Asset Iam Policy
Retrieves the current IAM policy data for asset
example
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,
});
Content copied to clipboard
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"])
Content copied to clipboard
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,
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
policy:
fn::invoke:
Function: gcp:dataplex:getAssetIamPolicy
Arguments:
project: ${example.project}
location: ${example.location}
lake: ${example.lake}
dataplexZone: ${example.dataplexZone}
asset: ${example.name}
Content copied to clipboard
Return
A collection of values returned by getAssetIamPolicy.
Parameters
argument
A collection of arguments for invoking getAssetIamPolicy.
suspend fun getAssetIamPolicy(asset: String, dataplexZone: String, lake: String, location: String? = null, project: String? = null): GetAssetIamPolicyResult
Return
A collection of values returned by getAssetIamPolicy.
Parameters
asset
Used to find the parent resource to bind the IAM policy to
dataplex Zone
lake
location
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.
See also
suspend fun getAssetIamPolicy(argument: suspend GetAssetIamPolicyPlainArgsBuilder.() -> Unit): GetAssetIamPolicyResult
Return
A collection of values returned by getAssetIamPolicy.
Parameters
argument
Builder for com.pulumi.gcp.dataplex.kotlin.inputs.GetAssetIamPolicyPlainArgs.