1. Packages
  2. Dynatrace
  3. API Docs
  4. IamGroup
Dynatrace v0.1.0 published on Wednesday, May 24, 2023 by Lbrlabs

dynatrace.IamGroup

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.1.0 published on Wednesday, May 24, 2023 by Lbrlabs

    Dynatrace Documentation

    • Dynatrace IAM - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions

    • Settings API - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions/iam/iam-getting-started

    Prerequisites

    Using this resource requires an OAuth client to be configured within your account settings. The scopes of the OAuth Client need to include account-idm-read, account-idm-write, account-env-read, account-env-write, iam-policies-management, iam:policies:write, iam:policies:read, iam:bindings:write, iam:bindings:read and iam:effective-permissions:read.

    Finally the provider configuration requires the credentials for that OAuth Client. The configuration section of your provider needs to look like this.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Resource Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@lbrlabs/pulumi-dynatrace";
    
    const restricted = new dynatrace.IamGroup("restricted", {permissions: {
        permissions: [{
            name: "tenant-viewer",
            scope: "<environment-id>:<managementzone-id>",
            type: "management-zone",
        }],
    }});
    
    import pulumi
    import lbrlabs_pulumi_dynatrace as dynatrace
    
    restricted = dynatrace.IamGroup("restricted", permissions=dynatrace.IamGroupPermissionsArgs(
        permissions=[dynatrace.IamGroupPermissionsPermissionArgs(
            name="tenant-viewer",
            scope="<environment-id>:<managementzone-id>",
            type="management-zone",
        )],
    ))
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Lbrlabs.PulumiPackage.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var restricted = new Dynatrace.IamGroup("restricted", new()
        {
            Permissions = new Dynatrace.Inputs.IamGroupPermissionsArgs
            {
                Permissions = new[]
                {
                    new Dynatrace.Inputs.IamGroupPermissionsPermissionArgs
                    {
                        Name = "tenant-viewer",
                        Scope = "<environment-id>:<managementzone-id>",
                        Type = "management-zone",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dynatrace/sdk/go/dynatrace"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dynatrace.NewIamGroup(ctx, "restricted", &dynatrace.IamGroupArgs{
    			Permissions: &dynatrace.IamGroupPermissionsArgs{
    				Permissions: dynatrace.IamGroupPermissionsPermissionArray{
    					&dynatrace.IamGroupPermissionsPermissionArgs{
    						Name:  pulumi.String("tenant-viewer"),
    						Scope: pulumi.String("<environment-id>:<managementzone-id>"),
    						Type:  pulumi.String("management-zone"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.IamGroup;
    import com.pulumi.dynatrace.IamGroupArgs;
    import com.pulumi.dynatrace.inputs.IamGroupPermissionsArgs;
    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) {
            var restricted = new IamGroup("restricted", IamGroupArgs.builder()        
                .permissions(IamGroupPermissionsArgs.builder()
                    .permissions(IamGroupPermissionsPermissionArgs.builder()
                        .name("tenant-viewer")
                        .scope("<environment-id>:<managementzone-id>")
                        .type("management-zone")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      restricted:
        type: dynatrace:IamGroup
        properties:
          permissions:
            permissions:
              - name: tenant-viewer
                scope: <environment-id>:<managementzone-id>
                type: management-zone
    

    Create IamGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IamGroup(name: string, args?: IamGroupArgs, opts?: CustomResourceOptions);
    @overload
    def IamGroup(resource_name: str,
                 args: Optional[IamGroupArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 description: Optional[str] = None,
                 federated_attribute_values: Optional[Sequence[str]] = None,
                 name: Optional[str] = None,
                 permissions: Optional[IamGroupPermissionsArgs] = None)
    func NewIamGroup(ctx *Context, name string, args *IamGroupArgs, opts ...ResourceOption) (*IamGroup, error)
    public IamGroup(string name, IamGroupArgs? args = null, CustomResourceOptions? opts = null)
    public IamGroup(String name, IamGroupArgs args)
    public IamGroup(String name, IamGroupArgs args, CustomResourceOptions options)
    
    type: dynatrace:IamGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var iamGroupResource = new Dynatrace.IamGroup("iamGroupResource", new()
    {
        Description = "string",
        FederatedAttributeValues = new[]
        {
            "string",
        },
        Name = "string",
        Permissions = new Dynatrace.Inputs.IamGroupPermissionsArgs
        {
            Permissions = new[]
            {
                new Dynatrace.Inputs.IamGroupPermissionsPermissionArgs
                {
                    Name = "string",
                    Scope = "string",
                    Type = "string",
                },
            },
        },
    });
    
    example, err := dynatrace.NewIamGroup(ctx, "iamGroupResource", &dynatrace.IamGroupArgs{
    	Description: pulumi.String("string"),
    	FederatedAttributeValues: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	Permissions: &dynatrace.IamGroupPermissionsArgs{
    		Permissions: dynatrace.IamGroupPermissionsPermissionArray{
    			&dynatrace.IamGroupPermissionsPermissionArgs{
    				Name:  pulumi.String("string"),
    				Scope: pulumi.String("string"),
    				Type:  pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var iamGroupResource = new IamGroup("iamGroupResource", IamGroupArgs.builder()        
        .description("string")
        .federatedAttributeValues("string")
        .name("string")
        .permissions(IamGroupPermissionsArgs.builder()
            .permissions(IamGroupPermissionsPermissionArgs.builder()
                .name("string")
                .scope("string")
                .type("string")
                .build())
            .build())
        .build());
    
    iam_group_resource = dynatrace.IamGroup("iamGroupResource",
        description="string",
        federated_attribute_values=["string"],
        name="string",
        permissions=dynatrace.IamGroupPermissionsArgs(
            permissions=[dynatrace.IamGroupPermissionsPermissionArgs(
                name="string",
                scope="string",
                type="string",
            )],
        ))
    
    const iamGroupResource = new dynatrace.IamGroup("iamGroupResource", {
        description: "string",
        federatedAttributeValues: ["string"],
        name: "string",
        permissions: {
            permissions: [{
                name: "string",
                scope: "string",
                type: "string",
            }],
        },
    });
    
    type: dynatrace:IamGroup
    properties:
        description: string
        federatedAttributeValues:
            - string
        name: string
        permissions:
            permissions:
                - name: string
                  scope: string
                  type: string
    

    IamGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IamGroup resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IamGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IamGroup Resource

    Get an existing IamGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IamGroupState, opts?: CustomResourceOptions): IamGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            federated_attribute_values: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            permissions: Optional[IamGroupPermissionsArgs] = None) -> IamGroup
    func GetIamGroup(ctx *Context, name string, id IDInput, state *IamGroupState, opts ...ResourceOption) (*IamGroup, error)
    public static IamGroup Get(string name, Input<string> id, IamGroupState? state, CustomResourceOptions? opts = null)
    public static IamGroup get(String name, Output<String> id, IamGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.

    Supporting Types

    IamGroupPermissions, IamGroupPermissionsArgs

    IamGroupPermissionsPermission, IamGroupPermissionsPermissionArgs

    Name string
    Scope string
    Type string
    Name string
    Scope string
    Type string
    name String
    scope String
    type String
    name string
    scope string
    type string
    name str
    scope str
    type str
    name String
    scope String
    type String

    Package Details

    Repository
    dynatrace lbrlabs/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Dynatrace v0.1.0 published on Wednesday, May 24, 2023 by Lbrlabs