1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. logging
  5. getLogViewIamPolicy
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.logging.getLogViewIamPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Retrieves the current IAM policy data for logview

    example

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = gcp.logging.getLogViewIamPolicy({
        parent: loggingLogView.parent,
        location: loggingLogView.location,
        bucket: loggingLogView.bucket,
        name: loggingLogView.name,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.logging.get_log_view_iam_policy(parent=logging_log_view["parent"],
        location=logging_log_view["location"],
        bucket=logging_log_view["bucket"],
        name=logging_log_view["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/logging"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := logging.LookupLogViewIamPolicy(ctx, &logging.LookupLogViewIamPolicyArgs{
    			Parent:   loggingLogView.Parent,
    			Location: pulumi.StringRef(loggingLogView.Location),
    			Bucket:   loggingLogView.Bucket,
    			Name:     loggingLogView.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = Gcp.Logging.GetLogViewIamPolicy.Invoke(new()
        {
            Parent = loggingLogView.Parent,
            Location = loggingLogView.Location,
            Bucket = loggingLogView.Bucket,
            Name = loggingLogView.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.logging.LoggingFunctions;
    import com.pulumi.gcp.logging.inputs.GetLogViewIamPolicyArgs;
    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 = LoggingFunctions.getLogViewIamPolicy(GetLogViewIamPolicyArgs.builder()
                .parent(loggingLogView.parent())
                .location(loggingLogView.location())
                .bucket(loggingLogView.bucket())
                .name(loggingLogView.name())
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          Function: gcp:logging:getLogViewIamPolicy
          Arguments:
            parent: ${loggingLogView.parent}
            location: ${loggingLogView.location}
            bucket: ${loggingLogView.bucket}
            name: ${loggingLogView.name}
    

    Using getLogViewIamPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLogViewIamPolicy(args: GetLogViewIamPolicyArgs, opts?: InvokeOptions): Promise<GetLogViewIamPolicyResult>
    function getLogViewIamPolicyOutput(args: GetLogViewIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetLogViewIamPolicyResult>
    def get_log_view_iam_policy(bucket: Optional[str] = None,
                                location: Optional[str] = None,
                                name: Optional[str] = None,
                                parent: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetLogViewIamPolicyResult
    def get_log_view_iam_policy_output(bucket: Optional[pulumi.Input[str]] = None,
                                location: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                parent: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetLogViewIamPolicyResult]
    func LookupLogViewIamPolicy(ctx *Context, args *LookupLogViewIamPolicyArgs, opts ...InvokeOption) (*LookupLogViewIamPolicyResult, error)
    func LookupLogViewIamPolicyOutput(ctx *Context, args *LookupLogViewIamPolicyOutputArgs, opts ...InvokeOption) LookupLogViewIamPolicyResultOutput

    > Note: This function is named LookupLogViewIamPolicy in the Go SDK.

    public static class GetLogViewIamPolicy 
    {
        public static Task<GetLogViewIamPolicyResult> InvokeAsync(GetLogViewIamPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetLogViewIamPolicyResult> Invoke(GetLogViewIamPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLogViewIamPolicyResult> getLogViewIamPolicy(GetLogViewIamPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:logging/getLogViewIamPolicy:getLogViewIamPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    The bucket of the resource Used to find the parent resource to bind the IAM policy to
    Name string
    Used to find the parent resource to bind the IAM policy to
    Parent string
    The parent of the resource. Used to find the parent resource to bind the IAM policy to
    Location string
    The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.
    Bucket string
    The bucket of the resource Used to find the parent resource to bind the IAM policy to
    Name string
    Used to find the parent resource to bind the IAM policy to
    Parent string
    The parent of the resource. Used to find the parent resource to bind the IAM policy to
    Location string
    The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.
    bucket String
    The bucket of the resource Used to find the parent resource to bind the IAM policy to
    name String
    Used to find the parent resource to bind the IAM policy to
    parent String
    The parent of the resource. Used to find the parent resource to bind the IAM policy to
    location String
    The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.
    bucket string
    The bucket of the resource Used to find the parent resource to bind the IAM policy to
    name string
    Used to find the parent resource to bind the IAM policy to
    parent string
    The parent of the resource. Used to find the parent resource to bind the IAM policy to
    location string
    The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.
    bucket str
    The bucket of the resource Used to find the parent resource to bind the IAM policy to
    name str
    Used to find the parent resource to bind the IAM policy to
    parent str
    The parent of the resource. Used to find the parent resource to bind the IAM policy to
    location str
    The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.
    bucket String
    The bucket of the resource Used to find the parent resource to bind the IAM policy to
    name String
    Used to find the parent resource to bind the IAM policy to
    parent String
    The parent of the resource. Used to find the parent resource to bind the IAM policy to
    location String
    The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.

    getLogViewIamPolicy Result

    The following output properties are available:

    Bucket string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    Parent string
    PolicyData string
    (Required only by gcp.logging.LogViewIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Bucket string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    Parent string
    PolicyData string
    (Required only by gcp.logging.LogViewIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    bucket String
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    parent String
    policyData String
    (Required only by gcp.logging.LogViewIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    bucket string
    etag string
    (Computed) The etag of the IAM policy.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    name string
    parent string
    policyData string
    (Required only by gcp.logging.LogViewIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    bucket str
    etag str
    (Computed) The etag of the IAM policy.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    name str
    parent str
    policy_data str
    (Required only by gcp.logging.LogViewIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    bucket String
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    parent String
    policyData String
    (Required only by gcp.logging.LogViewIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi