getTestablePermissions

Retrieve a list of testable permissions for a resource. Testable permissions mean the permissions that user can add or remove in a role at a given resource. The resource can be referenced either via the full resource name or via a URI.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var perms = Output.Create(Gcp.Iam.GetTestablePermissions.InvokeAsync(new Gcp.Iam.GetTestablePermissionsArgs
        {
            FullResourceName = "//cloudresourcemanager.googleapis.com/projects/my-project",
            Stages = 
            {
                "GA",
                "BETA",
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.GetTestablePermissions(ctx, &iam.GetTestablePermissionsArgs{
			FullResourceName: "//cloudresourcemanager.googleapis.com/projects/my-project",
			Stages: []string{
				"GA",
				"BETA",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gcp as gcp

perms = gcp.iam.get_testable_permissions(full_resource_name="//cloudresourcemanager.googleapis.com/projects/my-project",
    stages=[
        "GA",
        "BETA",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const perms = pulumi.output(gcp.iam.getTestablePermissions({
    fullResourceName: "//cloudresourcemanager.googleapis.com/projects/my-project",
    stages: [
        "GA",
        "BETA",
    ],
}, { async: true }));

Using getTestablePermissions

function getTestablePermissions(args: GetTestablePermissionsArgs, opts?: InvokeOptions): Promise<GetTestablePermissionsResult>
def get_testable_permissions(custom_support_level: Optional[str] = None,
                             full_resource_name: Optional[str] = None,
                             stages: Optional[Sequence[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> GetTestablePermissionsResult
func GetTestablePermissions(ctx *Context, args *GetTestablePermissionsArgs, opts ...InvokeOption) (*GetTestablePermissionsResult, error)

Note: This function is named GetTestablePermissions in the Go SDK.

public static class GetTestablePermissions {
    public static Task<GetTestablePermissionsResult> InvokeAsync(GetTestablePermissionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

FullResourceName string
See full resource name documentation for more detail.
CustomSupportLevel string
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
Stages List<string>
The acceptable release stages of the permission in the output. Note that BETA does not include permissions in GA, but you can specify both with ["GA", "BETA"] for example. Can be a list of "ALPHA", "BETA", "GA", "DEPRECATED". Default is ["GA"].
FullResourceName string
See full resource name documentation for more detail.
CustomSupportLevel string
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
Stages []string
The acceptable release stages of the permission in the output. Note that BETA does not include permissions in GA, but you can specify both with ["GA", "BETA"] for example. Can be a list of "ALPHA", "BETA", "GA", "DEPRECATED". Default is ["GA"].
fullResourceName string
See full resource name documentation for more detail.
customSupportLevel string
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
stages string[]
The acceptable release stages of the permission in the output. Note that BETA does not include permissions in GA, but you can specify both with ["GA", "BETA"] for example. Can be a list of "ALPHA", "BETA", "GA", "DEPRECATED". Default is ["GA"].
full_resource_name str
See full resource name documentation for more detail.
custom_support_level str
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
stages Sequence[str]
The acceptable release stages of the permission in the output. Note that BETA does not include permissions in GA, but you can specify both with ["GA", "BETA"] for example. Can be a list of "ALPHA", "BETA", "GA", "DEPRECATED". Default is ["GA"].

getTestablePermissions Result

The following output properties are available:

FullResourceName string
Id string
The provider-assigned unique ID for this managed resource.
Permissions List<GetTestablePermissionsPermission>
A list of permissions matching the provided input. Structure is defined below.
CustomSupportLevel string
The the support level of this permission for custom roles.
Stages List<string>
FullResourceName string
Id string
The provider-assigned unique ID for this managed resource.
Permissions []GetTestablePermissionsPermission
A list of permissions matching the provided input. Structure is defined below.
CustomSupportLevel string
The the support level of this permission for custom roles.
Stages []string
fullResourceName string
id string
The provider-assigned unique ID for this managed resource.
permissions GetTestablePermissionsPermission[]
A list of permissions matching the provided input. Structure is defined below.
customSupportLevel string
The the support level of this permission for custom roles.
stages string[]
full_resource_name str
id str
The provider-assigned unique ID for this managed resource.
permissions Sequence[GetTestablePermissionsPermission]
A list of permissions matching the provided input. Structure is defined below.
custom_support_level str
The the support level of this permission for custom roles.
stages Sequence[str]

Supporting Types

GetTestablePermissionsPermission

ApiDisabled bool
Whether the corresponding API has been enabled for the resource.
CustomSupportLevel string
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
Name string
Name of the permission.
Stage string
Release stage of the permission.
Title string
Human readable title of the permission.
ApiDisabled bool
Whether the corresponding API has been enabled for the resource.
CustomSupportLevel string
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
Name string
Name of the permission.
Stage string
Release stage of the permission.
Title string
Human readable title of the permission.
apiDisabled boolean
Whether the corresponding API has been enabled for the resource.
customSupportLevel string
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
name string
Name of the permission.
stage string
Release stage of the permission.
title string
Human readable title of the permission.
api_disabled bool
Whether the corresponding API has been enabled for the resource.
custom_support_level str
The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"
name str
Name of the permission.
stage str
Release stage of the permission.
title str
Human readable title of the permission.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.