dynatrace.IamPolicyBindings
Explore with Pulumi AI
This resource is excluded by default in the export utility since it is part of the account management API. You can, of course, specify that resource explicitly in order to export it. In that case, don’t forget to specify the environment variables
DT_CLIENT_ID
,DT_ACCOUNT_ID
andDT_CLIENT_SECRET
for authentication.
This resource requires the API token scope Allow IAM policy configuration for environments (
iam-policies-management
)
Dynatrace Documentation
Dynatrace IAM Group Permissions - https://www.dynatrace.com/support/help/manage/access-control/user-management-and-sso/manage-groups-and-permissions/iam/iam-group-mgt
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
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
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) {
}
}
{}
Create IamPolicyBindings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamPolicyBindings(name: string, args: IamPolicyBindingsArgs, opts?: CustomResourceOptions);
@overload
def IamPolicyBindings(resource_name: str,
args: IamPolicyBindingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamPolicyBindings(resource_name: str,
opts: Optional[ResourceOptions] = None,
group: Optional[str] = None,
policies: Optional[Sequence[str]] = None,
account: Optional[str] = None,
environment: Optional[str] = None)
func NewIamPolicyBindings(ctx *Context, name string, args IamPolicyBindingsArgs, opts ...ResourceOption) (*IamPolicyBindings, error)
public IamPolicyBindings(string name, IamPolicyBindingsArgs args, CustomResourceOptions? opts = null)
public IamPolicyBindings(String name, IamPolicyBindingsArgs args)
public IamPolicyBindings(String name, IamPolicyBindingsArgs args, CustomResourceOptions options)
type: dynatrace:IamPolicyBindings
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 IamPolicyBindingsArgs
- 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 IamPolicyBindingsArgs
- 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 IamPolicyBindingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamPolicyBindingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamPolicyBindingsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var iamPolicyBindingsResource = new Dynatrace.IamPolicyBindings("iamPolicyBindingsResource", new()
{
Group = "string",
Policies = new[]
{
"string",
},
Account = "string",
Environment = "string",
});
example, err := dynatrace.NewIamPolicyBindings(ctx, "iamPolicyBindingsResource", &dynatrace.IamPolicyBindingsArgs{
Group: pulumi.String("string"),
Policies: pulumi.StringArray{
pulumi.String("string"),
},
Account: pulumi.String("string"),
Environment: pulumi.String("string"),
})
var iamPolicyBindingsResource = new IamPolicyBindings("iamPolicyBindingsResource", IamPolicyBindingsArgs.builder()
.group("string")
.policies("string")
.account("string")
.environment("string")
.build());
iam_policy_bindings_resource = dynatrace.IamPolicyBindings("iamPolicyBindingsResource",
group="string",
policies=["string"],
account="string",
environment="string")
const iamPolicyBindingsResource = new dynatrace.IamPolicyBindings("iamPolicyBindingsResource", {
group: "string",
policies: ["string"],
account: "string",
environment: "string",
});
type: dynatrace:IamPolicyBindings
properties:
account: string
environment: string
group: string
policies:
- string
IamPolicyBindings 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 IamPolicyBindings resource accepts the following input properties:
- Group string
- The name of the policy
- Policies List<string>
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
. - Account string
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - Environment string
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment.
- Group string
- The name of the policy
- Policies []string
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
. - Account string
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - Environment string
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment.
- group String
- The name of the policy
- policies List<String>
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
. - account String
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment String
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment.
- group string
- The name of the policy
- policies string[]
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
. - account string
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment string
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment.
- group str
- The name of the policy
- policies Sequence[str]
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
. - account str
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment str
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment.
- group String
- The name of the policy
- policies List<String>
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
. - account String
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment String
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamPolicyBindings 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 IamPolicyBindings Resource
Get an existing IamPolicyBindings 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?: IamPolicyBindingsState, opts?: CustomResourceOptions): IamPolicyBindings
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account: Optional[str] = None,
environment: Optional[str] = None,
group: Optional[str] = None,
policies: Optional[Sequence[str]] = None) -> IamPolicyBindings
func GetIamPolicyBindings(ctx *Context, name string, id IDInput, state *IamPolicyBindingsState, opts ...ResourceOption) (*IamPolicyBindings, error)
public static IamPolicyBindings Get(string name, Input<string> id, IamPolicyBindingsState? state, CustomResourceOptions? opts = null)
public static IamPolicyBindings get(String name, Output<String> id, IamPolicyBindingsState 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.
- Account string
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - Environment string
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment. - Group string
- The name of the policy
- Policies List<string>
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
.
- Account string
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - Environment string
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment. - Group string
- The name of the policy
- Policies []string
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
.
- account String
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment String
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment. - group String
- The name of the policy
- policies List<String>
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
.
- account string
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment string
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment. - group string
- The name of the policy
- policies string[]
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
.
- account str
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment str
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment. - group str
- The name of the policy
- policies Sequence[str]
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
.
- account String
- The UUID of the account (
urn:dtaccount:<account-uuid>
). The attributepolicies
must contain ONLY policies defined for that account. The prefixurn:dtaccount:
MUST be omitted here. - environment String
- The ID of the environment (https://\n\n.live.dynatrace.com). The attribute
policies
must contain ONLY policies defined for that environment. - group String
- The name of the policy
- policies List<String>
- A list of IDs referring to policies bound to that group. It's not possible to mix policies here that are defined for different scopes (different accounts or environments) than specified via attributes
account
orenvironment
.
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatrace
Terraform Provider.