1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. bigquery
  5. getConnectionIamPolicy
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

gcp.bigquery.getConnectionIamPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Retrieves the current IAM policy data for connection

    example

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = gcp.bigquery.getConnectionIamPolicy({
        project: connection.project,
        location: connection.location,
        connectionId: connection.connectionId,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.bigquery.get_connection_iam_policy(project=connection["project"],
        location=connection["location"],
        connection_id=connection["connectionId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.LookupConnectionIamPolicy(ctx, &bigquery.LookupConnectionIamPolicyArgs{
    			Project:      pulumi.StringRef(connection.Project),
    			Location:     pulumi.StringRef(connection.Location),
    			ConnectionId: connection.ConnectionId,
    		}, 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.BigQuery.GetConnectionIamPolicy.Invoke(new()
        {
            Project = connection.Project,
            Location = connection.Location,
            ConnectionId = connection.ConnectionId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.BigqueryFunctions;
    import com.pulumi.gcp.bigquery.inputs.GetConnectionIamPolicyArgs;
    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 = BigqueryFunctions.getConnectionIamPolicy(GetConnectionIamPolicyArgs.builder()
                .project(connection.project())
                .location(connection.location())
                .connectionId(connection.connectionId())
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          Function: gcp:bigquery:getConnectionIamPolicy
          Arguments:
            project: ${connection.project}
            location: ${connection.location}
            connectionId: ${connection.connectionId}
    

    Using getConnectionIamPolicy

    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 getConnectionIamPolicy(args: GetConnectionIamPolicyArgs, opts?: InvokeOptions): Promise<GetConnectionIamPolicyResult>
    function getConnectionIamPolicyOutput(args: GetConnectionIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetConnectionIamPolicyResult>
    def get_connection_iam_policy(connection_id: Optional[str] = None,
                                  location: Optional[str] = None,
                                  project: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetConnectionIamPolicyResult
    def get_connection_iam_policy_output(connection_id: Optional[pulumi.Input[str]] = None,
                                  location: Optional[pulumi.Input[str]] = None,
                                  project: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetConnectionIamPolicyResult]
    func LookupConnectionIamPolicy(ctx *Context, args *LookupConnectionIamPolicyArgs, opts ...InvokeOption) (*LookupConnectionIamPolicyResult, error)
    func LookupConnectionIamPolicyOutput(ctx *Context, args *LookupConnectionIamPolicyOutputArgs, opts ...InvokeOption) LookupConnectionIamPolicyResultOutput

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

    public static class GetConnectionIamPolicy 
    {
        public static Task<GetConnectionIamPolicyResult> InvokeAsync(GetConnectionIamPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetConnectionIamPolicyResult> Invoke(GetConnectionIamPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConnectionIamPolicyResult> getConnectionIamPolicy(GetConnectionIamPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:bigquery/getConnectionIamPolicy:getConnectionIamPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ConnectionId string
    Optional connection id that should be assigned to the created connection. Used to find the parent resource to bind the IAM policy to
    Location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2 Used to find the parent resource to bind the IAM policy to
    Project string
    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.
    ConnectionId string
    Optional connection id that should be assigned to the created connection. Used to find the parent resource to bind the IAM policy to
    Location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2 Used to find the parent resource to bind the IAM policy to
    Project string
    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.
    connectionId String
    Optional connection id that should be assigned to the created connection. Used to find the parent resource to bind the IAM policy to
    location String
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2 Used to find the parent resource to bind the IAM policy to
    project String
    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.
    connectionId string
    Optional connection id that should be assigned to the created connection. Used to find the parent resource to bind the IAM policy to
    location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2 Used to find the parent resource to bind the IAM policy to
    project string
    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.
    connection_id str
    Optional connection id that should be assigned to the created connection. Used to find the parent resource to bind the IAM policy to
    location str
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2 Used to find the parent resource to bind the IAM policy to
    project str
    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.
    connectionId String
    Optional connection id that should be assigned to the created connection. Used to find the parent resource to bind the IAM policy to
    location String
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2 Used to find the parent resource to bind the IAM policy to
    project String
    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.

    getConnectionIamPolicy Result

    The following output properties are available:

    ConnectionId string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    PolicyData string
    (Required only by gcp.bigquery.ConnectionIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Project string
    ConnectionId string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    PolicyData string
    (Required only by gcp.bigquery.ConnectionIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Project string
    connectionId String
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    policyData String
    (Required only by gcp.bigquery.ConnectionIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project String
    connectionId string
    etag string
    (Computed) The etag of the IAM policy.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    policyData string
    (Required only by gcp.bigquery.ConnectionIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project string
    connection_id str
    etag str
    (Computed) The etag of the IAM policy.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    policy_data str
    (Required only by gcp.bigquery.ConnectionIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project str
    connectionId String
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    policyData String
    (Required only by gcp.bigquery.ConnectionIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project String

    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 v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi