getAssetIamPolicy

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: google_dataplex_asset.example.project,
location: google_dataplex_asset.example.location,
lake: google_dataplex_asset.example.lake,
dataplexZone: google_dataplex_asset.example.dataplex_zone,
asset: google_dataplex_asset.example.name,
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.dataplex.get_asset_iam_policy(project=google_dataplex_asset["example"]["project"],
location=google_dataplex_asset["example"]["location"],
lake=google_dataplex_asset["example"]["lake"],
dataplex_zone=google_dataplex_asset["example"]["dataplex_zone"],
asset=google_dataplex_asset["example"]["name"])
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 = google_dataplex_asset.Example.Project,
Location = google_dataplex_asset.Example.Location,
Lake = google_dataplex_asset.Example.Lake,
DataplexZone = google_dataplex_asset.Example.Dataplex_zone,
Asset = google_dataplex_asset.Example.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/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(google_dataplex_asset.Example.Project),
Location: pulumi.StringRef(google_dataplex_asset.Example.Location),
Lake: google_dataplex_asset.Example.Lake,
DataplexZone: google_dataplex_asset.Example.Dataplex_zone,
Asset: google_dataplex_asset.Example.Name,
}, nil)
if err != nil {
return err
}
return nil
})
}
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(google_dataplex_asset.example().project())
.location(google_dataplex_asset.example().location())
.lake(google_dataplex_asset.example().lake())
.dataplexZone(google_dataplex_asset.example().dataplex_zone())
.asset(google_dataplex_asset.example().name())
.build());
}
}
variables:
policy:
fn::invoke:
Function: gcp:dataplex:getAssetIamPolicy
Arguments:
project: ${google_dataplex_asset.example.project}
location: ${google_dataplex_asset.example.location}
lake: ${google_dataplex_asset.example.lake}
dataplexZone: ${google_dataplex_asset.example.dataplex_zone}
asset: ${google_dataplex_asset.example.name}

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

dataplexZone
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


Return

A collection of values returned by getAssetIamPolicy.

Parameters

argument

Builder for com.pulumi.gcp.dataplex.kotlin.inputs.GetAssetIamPolicyPlainArgs.

See also