1. Packages
  2. Datadog Provider
  3. API Docs
  4. getPermissions
Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi

datadog.getPermissions

Explore with Pulumi AI

datadog logo
Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi

    Use this data source to retrieve the list of Datadog permissions by name and their corresponding ID, for use in the role resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const permissions = datadog.getPermissions({});
    
    import pulumi
    import pulumi_datadog as datadog
    
    permissions = datadog.get_permissions()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datadog.GetPermissions(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var permissions = Datadog.GetPermissions.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.DatadogFunctions;
    import com.pulumi.datadog.inputs.GetPermissionsArgs;
    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 permissions = DatadogFunctions.getPermissions();
    
        }
    }
    
    variables:
      permissions:
        fn::invoke:
          Function: datadog:getPermissions
          Arguments: {}
    

    Using getPermissions

    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 getPermissions(args: GetPermissionsArgs, opts?: InvokeOptions): Promise<GetPermissionsResult>
    function getPermissionsOutput(args: GetPermissionsOutputArgs, opts?: InvokeOptions): Output<GetPermissionsResult>
    def get_permissions(include_restricted: Optional[bool] = None,
                        opts: Optional[InvokeOptions] = None) -> GetPermissionsResult
    def get_permissions_output(include_restricted: Optional[pulumi.Input[bool]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetPermissionsResult]
    func GetPermissions(ctx *Context, args *GetPermissionsArgs, opts ...InvokeOption) (*GetPermissionsResult, error)
    func GetPermissionsOutput(ctx *Context, args *GetPermissionsOutputArgs, opts ...InvokeOption) GetPermissionsResultOutput

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

    public static class GetPermissions 
    {
        public static Task<GetPermissionsResult> InvokeAsync(GetPermissionsArgs args, InvokeOptions? opts = null)
        public static Output<GetPermissionsResult> Invoke(GetPermissionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPermissionsResult> getPermissions(GetPermissionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: datadog:index/getPermissions:getPermissions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IncludeRestricted bool
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    IncludeRestricted bool
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    includeRestricted Boolean
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    includeRestricted boolean
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    include_restricted bool
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    includeRestricted Boolean
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.

    getPermissions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Permissions Dictionary<string, string>
    Map of permissions names to their corresponding ID.
    IncludeRestricted bool
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    Id string
    The provider-assigned unique ID for this managed resource.
    Permissions map[string]string
    Map of permissions names to their corresponding ID.
    IncludeRestricted bool
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    id String
    The provider-assigned unique ID for this managed resource.
    permissions Map<String,String>
    Map of permissions names to their corresponding ID.
    includeRestricted Boolean
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    id string
    The provider-assigned unique ID for this managed resource.
    permissions {[key: string]: string}
    Map of permissions names to their corresponding ID.
    includeRestricted boolean
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    id str
    The provider-assigned unique ID for this managed resource.
    permissions Mapping[str, str]
    Map of permissions names to their corresponding ID.
    include_restricted bool
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.
    id String
    The provider-assigned unique ID for this managed resource.
    permissions Map<String>
    Map of permissions names to their corresponding ID.
    includeRestricted Boolean
    Whether to include restricted permissions. Restricted permissions are granted by default to all users of a Datadog org, and cannot be manually granted or revoked. Defaults to false.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi