hsdp.IamRole
Explore with Pulumi AI
Provides a resource for managing HSDP IAM roles
Example Usage
The following example creates a role
import * as pulumi from "@pulumi/pulumi";
import * as hsdp from "@pulumi/hsdp";
const tDRALL = new hsdp.IamRole("tDRALL", {
description: "Role for TDR users with ALL access",
permissions: [
"DATAITEM.CREATEONBEHALF",
"DATAITEM.READ",
"DATAITEM.DELETEONBEHALF",
"DATAITEM.DELETE",
"CONTRACT.CREATE",
"DATAITEM.READONBEHALF",
"CONTRACT.READ",
"DATAITEM.CREATE",
],
managingOrganization: hsdp_iam_org.testdev.id,
});
import pulumi
import pulumi_hsdp as hsdp
t_drall = hsdp.IamRole("tDRALL",
description="Role for TDR users with ALL access",
permissions=[
"DATAITEM.CREATEONBEHALF",
"DATAITEM.READ",
"DATAITEM.DELETEONBEHALF",
"DATAITEM.DELETE",
"CONTRACT.CREATE",
"DATAITEM.READONBEHALF",
"CONTRACT.READ",
"DATAITEM.CREATE",
],
managing_organization=hsdp_iam_org["testdev"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := hsdp.NewIamRole(ctx, "tDRALL", &hsdp.IamRoleArgs{
Description: pulumi.String("Role for TDR users with ALL access"),
Permissions: pulumi.StringArray{
pulumi.String("DATAITEM.CREATEONBEHALF"),
pulumi.String("DATAITEM.READ"),
pulumi.String("DATAITEM.DELETEONBEHALF"),
pulumi.String("DATAITEM.DELETE"),
pulumi.String("CONTRACT.CREATE"),
pulumi.String("DATAITEM.READONBEHALF"),
pulumi.String("CONTRACT.READ"),
pulumi.String("DATAITEM.CREATE"),
},
ManagingOrganization: pulumi.Any(hsdp_iam_org.Testdev.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hsdp = Pulumi.Hsdp;
return await Deployment.RunAsync(() =>
{
var tDRALL = new Hsdp.IamRole("tDRALL", new()
{
Description = "Role for TDR users with ALL access",
Permissions = new[]
{
"DATAITEM.CREATEONBEHALF",
"DATAITEM.READ",
"DATAITEM.DELETEONBEHALF",
"DATAITEM.DELETE",
"CONTRACT.CREATE",
"DATAITEM.READONBEHALF",
"CONTRACT.READ",
"DATAITEM.CREATE",
},
ManagingOrganization = hsdp_iam_org.Testdev.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hsdp.IamRole;
import com.pulumi.hsdp.IamRoleArgs;
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 tDRALL = new IamRole("tDRALL", IamRoleArgs.builder()
.description("Role for TDR users with ALL access")
.permissions(
"DATAITEM.CREATEONBEHALF",
"DATAITEM.READ",
"DATAITEM.DELETEONBEHALF",
"DATAITEM.DELETE",
"CONTRACT.CREATE",
"DATAITEM.READONBEHALF",
"CONTRACT.READ",
"DATAITEM.CREATE")
.managingOrganization(hsdp_iam_org.testdev().id())
.build());
}
}
resources:
tDRALL:
type: hsdp:IamRole
properties:
description: Role for TDR users with ALL access
permissions:
- DATAITEM.CREATEONBEHALF
- DATAITEM.READ
- DATAITEM.DELETEONBEHALF
- DATAITEM.DELETE
- CONTRACT.CREATE
- DATAITEM.READONBEHALF
- CONTRACT.READ
- DATAITEM.CREATE
managingOrganization: ${hsdp_iam_org.testdev.id}
Create IamRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamRole(name: string, args: IamRoleArgs, opts?: CustomResourceOptions);
@overload
def IamRole(resource_name: str,
args: IamRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
managing_organization: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
description: Optional[str] = None,
iam_role_id: Optional[str] = None,
name: Optional[str] = None,
ticket_protection: Optional[bool] = None)
func NewIamRole(ctx *Context, name string, args IamRoleArgs, opts ...ResourceOption) (*IamRole, error)
public IamRole(string name, IamRoleArgs args, CustomResourceOptions? opts = null)
public IamRole(String name, IamRoleArgs args)
public IamRole(String name, IamRoleArgs args, CustomResourceOptions options)
type: hsdp:IamRole
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 IamRoleArgs
- 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 IamRoleArgs
- 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 IamRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamRoleArgs
- 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 iamRoleResource = new Hsdp.IamRole("iamRoleResource", new()
{
ManagingOrganization = "string",
Permissions = new[]
{
"string",
},
Description = "string",
IamRoleId = "string",
Name = "string",
TicketProtection = false,
});
example, err := hsdp.NewIamRole(ctx, "iamRoleResource", &hsdp.IamRoleArgs{
ManagingOrganization: pulumi.String("string"),
Permissions: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
IamRoleId: pulumi.String("string"),
Name: pulumi.String("string"),
TicketProtection: pulumi.Bool(false),
})
var iamRoleResource = new IamRole("iamRoleResource", IamRoleArgs.builder()
.managingOrganization("string")
.permissions("string")
.description("string")
.iamRoleId("string")
.name("string")
.ticketProtection(false)
.build());
iam_role_resource = hsdp.IamRole("iamRoleResource",
managing_organization="string",
permissions=["string"],
description="string",
iam_role_id="string",
name="string",
ticket_protection=False)
const iamRoleResource = new hsdp.IamRole("iamRoleResource", {
managingOrganization: "string",
permissions: ["string"],
description: "string",
iamRoleId: "string",
name: "string",
ticketProtection: false,
});
type: hsdp:IamRole
properties:
description: string
iamRoleId: string
managingOrganization: string
name: string
permissions:
- string
ticketProtection: false
IamRole Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IamRole resource accepts the following input properties:
- Managing
Organization string - The managing organization ID of this role
- Permissions List<string>
- The list of permission to assign to this role
- Description string
- The description of the group
- Iam
Role stringId - The GUID of the role
- Name string
- The name of the group
- Ticket
Protection bool - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- Managing
Organization string - The managing organization ID of this role
- Permissions []string
- The list of permission to assign to this role
- Description string
- The description of the group
- Iam
Role stringId - The GUID of the role
- Name string
- The name of the group
- Ticket
Protection bool - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- managing
Organization String - The managing organization ID of this role
- permissions List<String>
- The list of permission to assign to this role
- description String
- The description of the group
- iam
Role StringId - The GUID of the role
- name String
- The name of the group
- ticket
Protection Boolean - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- managing
Organization string - The managing organization ID of this role
- permissions string[]
- The list of permission to assign to this role
- description string
- The description of the group
- iam
Role stringId - The GUID of the role
- name string
- The name of the group
- ticket
Protection boolean - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- managing_
organization str - The managing organization ID of this role
- permissions Sequence[str]
- The list of permission to assign to this role
- description str
- The description of the group
- iam_
role_ strid - The GUID of the role
- name str
- The name of the group
- ticket_
protection bool - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- managing
Organization String - The managing organization ID of this role
- permissions List<String>
- The list of permission to assign to this role
- description String
- The description of the group
- iam
Role StringId - The GUID of the role
- name String
- The name of the group
- ticket
Protection Boolean - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamRole 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 IamRole Resource
Get an existing IamRole 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?: IamRoleState, opts?: CustomResourceOptions): IamRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
iam_role_id: Optional[str] = None,
managing_organization: Optional[str] = None,
name: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
ticket_protection: Optional[bool] = None) -> IamRole
func GetIamRole(ctx *Context, name string, id IDInput, state *IamRoleState, opts ...ResourceOption) (*IamRole, error)
public static IamRole Get(string name, Input<string> id, IamRoleState? state, CustomResourceOptions? opts = null)
public static IamRole get(String name, Output<String> id, IamRoleState state, CustomResourceOptions options)
resources: _: type: hsdp:IamRole get: id: ${id}
- 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.
- Description string
- The description of the group
- Iam
Role stringId - The GUID of the role
- Managing
Organization string - The managing organization ID of this role
- Name string
- The name of the group
- Permissions List<string>
- The list of permission to assign to this role
- Ticket
Protection bool - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- Description string
- The description of the group
- Iam
Role stringId - The GUID of the role
- Managing
Organization string - The managing organization ID of this role
- Name string
- The name of the group
- Permissions []string
- The list of permission to assign to this role
- Ticket
Protection bool - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- description String
- The description of the group
- iam
Role StringId - The GUID of the role
- managing
Organization String - The managing organization ID of this role
- name String
- The name of the group
- permissions List<String>
- The list of permission to assign to this role
- ticket
Protection Boolean - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- description string
- The description of the group
- iam
Role stringId - The GUID of the role
- managing
Organization string - The managing organization ID of this role
- name string
- The name of the group
- permissions string[]
- The list of permission to assign to this role
- ticket
Protection boolean - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- description str
- The description of the group
- iam_
role_ strid - The GUID of the role
- managing_
organization str - The managing organization ID of this role
- name str
- The name of the group
- permissions Sequence[str]
- The list of permission to assign to this role
- ticket_
protection bool - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
- description String
- The description of the group
- iam
Role StringId - The GUID of the role
- managing
Organization String - The managing organization ID of this role
- name String
- The name of the group
- permissions List<String>
- The list of permission to assign to this role
- ticket
Protection Boolean - Defaults to true. Setting to false will remove e.g.
CLIENT.SCOPES
permission which is only addable using a HSDP support ticket.
Import
$ pulumi import hsdp:index/iamRole:IamRole An existing role can be imported using `hsdp_iam_role`, e.g.
$ pulumi import hsdp:index/iamRole:IamRole > hsdp_iam_role.myrole a-guid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- hsdp philips-software/terraform-provider-hsdp
- License
- Notes
- This Pulumi package is based on the
hsdp
Terraform Provider.