Cloudflare

v4.13.0 published on Monday, Nov 28, 2022 by Pulumi

getApiTokenPermissionGroups

Use this data source to look up API Token Permission Groups. Commonly used as references within cloudflare.ApiToken resources.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var test = Cloudflare.GetApiTokenPermissionGroups.Invoke();

    return new Dictionary<string, object?>
    {
        ["dnsReadPermissionId"] = test.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.Permissions?.DNS_Read),
    };
});

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
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 test = CloudflareFunctions.getApiTokenPermissionGroups();

        ctx.export("dnsReadPermissionId", test.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.permissions().DNS Read()));
    }
}

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const test = cloudflare.getApiTokenPermissionGroups({});
export const dnsReadPermissionId = test.then(test => test.permissions?["DNS Read"]);
variables:
  test:
    fn::invoke:
      Function: cloudflare:getApiTokenPermissionGroups
      Arguments: {}
outputs:
  dnsReadPermissionId: ${test.permissions"DNS Read"[%!s(MISSING)]}

Using getApiTokenPermissionGroups

function getApiTokenPermissionGroups(opts?: InvokeOptions): Promise<GetApiTokenPermissionGroupsResult>
def get_api_token_permission_groups(opts: Optional[InvokeOptions] = None) -> GetApiTokenPermissionGroupsResult
func GetApiTokenPermissionGroups(ctx *Context, opts ...InvokeOption) (*GetApiTokenPermissionGroupsResult, error)

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

public static class GetApiTokenPermissionGroups 
{
    public static Task<GetApiTokenPermissionGroupsResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetApiTokenPermissionGroupsResult> getApiTokenPermissionGroups(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: cloudflare:index/getApiTokenPermissionGroups:getApiTokenPermissionGroups
  arguments:
    # arguments dictionary

getApiTokenPermissionGroups Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Permissions Dictionary<string, object>

A map of permission groups where keys are human-readable permission names and values are permission IDs.

Id string

The provider-assigned unique ID for this managed resource.

Permissions map[string]interface{}

A map of permission groups where keys are human-readable permission names and values are permission IDs.

id String

The provider-assigned unique ID for this managed resource.

permissions Map<String,Object>

A map of permission groups where keys are human-readable permission names and values are permission IDs.

id string

The provider-assigned unique ID for this managed resource.

permissions {[key: string]: any}

A map of permission groups where keys are human-readable permission names and values are permission IDs.

id str

The provider-assigned unique ID for this managed resource.

permissions Mapping[str, Any]

A map of permission groups where keys are human-readable permission names and values are permission IDs.

id String

The provider-assigned unique ID for this managed resource.

permissions Map<Any>

A map of permission groups where keys are human-readable permission names and values are permission IDs.

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.