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

Retrieve all the supported permissions able to be set on my-project that are in either GA or BETA. This is useful for dynamically constructing custom roles.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.iam.IamFunctions;
import com.pulumi.gcp.iam.inputs.GetTestablePermissionsArgs;
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 perms = IamFunctions.getTestablePermissions(GetTestablePermissionsArgs.builder()
.fullResourceName("//cloudresourcemanager.googleapis.com/projects/my-project")
.stages(
"GA",
"BETA")
.build());
}
}

Return

A collection of values returned by getTestablePermissions.

Parameters

argument

A collection of arguments for invoking getTestablePermissions.


suspend fun getTestablePermissions(customSupportLevel: String? = null, fullResourceName: String, stages: List<String>? = null): GetTestablePermissionsResult

Return

A collection of values returned by getTestablePermissions.

Parameters

customSupportLevel

The level of support for custom roles. Can be one of "NOT_SUPPORTED", "SUPPORTED", "TESTING". Default is "SUPPORTED"

fullResourceName
stages

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"].

See also


Return

A collection of values returned by getTestablePermissions.

Parameters

argument

Builder for com.pulumi.gcp.iam.kotlin.inputs.GetTestablePermissionsPlainArgs.

See also